Java integration architecture
The following figure illustrates Java integration architecture.
The architecture consists of the following components.
- Host Application: The Java-enabled application into which Kyvos data is queried using Kyvos Java APIs.
- Kyvos Client Components: Jar and configuration files to be included in the class path of the host application.
- Kyvos Cluster: One or more computer on which Kyvos software is running. Generally, this cluster is deployed on Hadoop cluster computers. One of these computers deploys the Kyvos BI Server (called OLAP engine earlier), which acts as a communication point for the client APIs. You may need the IP address or name of that computer to configure the APIs.
- APIs: The APIs provide Java Objects to prepare requests, and the Java method calls for querying data from cubes and querying metadata from cubes and other repository items. The Java methods are designed to use MDX when requesting cube data. Responses are given in the form of Java Objects.
The Kyvos Java APIs provide the capability to query and extract data from Kyvos cubes into an integrating host application. The APIs allow the applications to perform operations in Kyvos, such as:
- Work with files: You can register a data file present on HDFS and pass information necessary to parse and define columns. You can also create a register file from a particular table of database.
- Work with datasets: You can programmatically create datasets, apply transformations over a dataset, build dataset, and materialize the dataset.
- Work with dataset relationships: You can create a dataset relationship design (DRD) or draw relationship between defined datasets in DRD.
- Work with cubes: You can add a new cube object, build cube, modify the existing cubes, and query from cube.
To use the Java APIs with Kyvos, include the following jar files in the classpath of the host application.
The Kyvos installation folder contains these files at <Kyvos_Web_App_path>\WEB-INF\lib location.
Steps for using Java APIs
To use Java APIs for Kyvos:
- Set up the Kyvos environment:
You can configure the Kyvos Java APIs in the kyvosclient.properties file available in the <Kyvos_Web_App>\client\config folder.
Place the configured kyvosclient.properties file at the classpath of the integrating host application.
The REPORT_ENGINE_IP property in the kyvosclient.properties file should point to the Kyvos engine server.
For this, set the values as :
- Set REPORT_ENGINE_IP = <Enter Kyvos Engine IP address>
- Set REPORT_ENGINE_PORT = < Enter corresponding network Port>
- Set ZOOKEEPER_HOSTS = < Enter corresponding Zookeeper Host>
- Set CLUSTER_NAME = < Enter corresponding Cluster Name>
- Initialize the Kyvos client:
Use Init to initialize the Kyvos client. The object of this class is initialized only once in the lifetime of application. It will read the properties for Engine server related attributes and initialize the properties contained in the configuration file.
void com.kyvos.client.init.ReportClient.init(String absoluteFileName, boolean isAutoStart) throws InterfaceInitException
- Some objects are required for all use cases mentioned later in this document. Import UserInfo, an object required to authenticate the user in the Kyvos application:
- Create the object using the parameters requestorUserId and requestorUserPassword—the Kyvos System user identifier and password:
UserInfo userInfo = new UserInfo(requestorUserId, requestorUserPassword);