Document toolboxDocument toolbox

Java

Applies to: Kyvos Enterprise  Kyvos Cloud (SaaS on AWS) Kyvos AWS Marketplace

Kyvos Azure Marketplace   Kyvos GCP Marketplace Kyvos Single Node Installation (Kyvos SNI)


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 semantic models and querying metadata from semantic models and other repository items. The Java methods are designed to use MDX when requesting semantic model data. Responses are given in the form of Java Objects.

Java APIs 

The Kyvos Java APIs provide the capability to query and extract data from Kyvos semantic models into an integrating host application. The APIs allow the applications to perform operations in Kyvos, such as:  

  1. 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. 

  2. Work with datasets: You can programmatically create datasets, process dataset, and materialize the dataset. 

  3. Work with dataset relationships: You can create a dataset relationship design (DRD) or draw relationship between defined datasets in DRD. 

  4. Work with semantic models: You can add a new semantic model object, process semantic model, modify the existing semantic models, and query from semantic model. 

Prerequisite to run Java API

  1. Java is required.

  2. Connectivity from BI Server is required.

  3. Java API connects to BI Server not the Web portal.

  4. Add all JAR files present inside Jakarta Folder (/jakarta/webapps/kyvos/WEB-INF/lib) in the project classpath.

  5. Add the servlet-api.jar file present inside Jakarta Lib (/jakarta/lib) in project classpath.

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: 

  1. 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>

  2. 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

  3. 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: 

    import com.kyvos.client.common.UserInfo;

  4. Create the object using the parameters requestorUserId and requestorUserPassword—the Kyvos System user identifier and password: 

    UserInfo userInfo = new UserInfo(requestorUserId, requestorUserPassword); 

Use cases

Copyright Kyvos, Inc. All rights reserved.