Examples of SessionHandle


Examples of org.apache.hive.service.cli.SessionHandle

  @Override
  public TGetInfoResp GetInfo(TGetInfoReq req) throws TException {
    TGetInfoResp resp = new TGetInfoResp();
    try {
      GetInfoValue getInfoValue =
          cliService.getInfo(new SessionHandle(req.getSessionHandle()),
              GetInfoType.getGetInfoType(req.getInfoType()));
      resp.setInfoValue(getInfoValue.toTGetInfoValue());
      resp.setStatus(OK_STATUS);
    } catch (Exception e) {
      LOG.warn("Error getting info: ", e);
View Full Code Here

Examples of org.apache.hive.service.cli.SessionHandle

  @Override
  public TExecuteStatementResp ExecuteStatement(TExecuteStatementReq req) throws TException {
    TExecuteStatementResp resp = new TExecuteStatementResp();
    try {
      SessionHandle sessionHandle = new SessionHandle(req.getSessionHandle());
      String statement = req.getStatement();
      Map<String, String> confOverlay = req.getConfOverlay();
      Boolean runAsync = req.isRunAsync();
      OperationHandle operationHandle = runAsync ?
          cliService.executeStatementAsync(sessionHandle, statement, confOverlay)
View Full Code Here

Examples of org.apache.hive.service.cli.SessionHandle

  @Override
  public TGetTypeInfoResp GetTypeInfo(TGetTypeInfoReq req) throws TException {
    TGetTypeInfoResp resp = new TGetTypeInfoResp();
    try {
      OperationHandle operationHandle = cliService.getTypeInfo(new SessionHandle(req.getSessionHandle()));
      resp.setOperationHandle(operationHandle.toTOperationHandle());
      resp.setStatus(OK_STATUS);
    } catch (Exception e) {
      LOG.warn("Error getting type info: ", e);
      resp.setStatus(HiveSQLException.toTStatus(e));
View Full Code Here

Examples of org.eclipse.birt.report.model.api.SessionHandle

  private static void initDesigner() throws BirtException {
    DesignConfig config = new DesignConfig();
    Platform.startup(config);
    IDesignEngineFactory factory = (IDesignEngineFactory) Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);
    IDesignEngine engine = factory.createDesignEngine(config);
    SessionHandle session = engine.newSessionHandle(ULocale.ENGLISH);

    reportDesignHandle = session.openDesign(inputReportFile);
    elementFactory = reportDesignHandle.getElementFactory();
  }
View Full Code Here

Examples of org.eclipse.birt.report.model.api.SessionHandle

      IDesignEngineFactory factory = (IDesignEngineFactory) Platform
          .createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);
      engine = factory.createDesignEngine(dconfig);

      // create a new session
      SessionHandle session = engine.newSessionHandle(ULocale.ENGLISH);

      // create a design or a template. Then create a report element
      // factory
      ReportDesignHandle design = session.createDesign();
      ElementFactory efactory = design.getElementFactory();

      // set my initial properties
      design.setDisplayName("my Test Report");
      design.setDescription("test");
View Full Code Here

Examples of org.eclipse.birt.report.model.api.SessionHandle

          .createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);
      dengine = factory.createDesignEngine(dconfig);

      // create a new session, open the library, and retrieve the first
      // data source since it is uniform in our library
      SessionHandle session = dengine.newSessionHandle(ULocale.ENGLISH);
      LibraryHandle design = session
          .openLibrary("C:/eclipse/GWTBirt/BIRTGwt/src/reports/DataSets.rptlibrary");
      dataSourceHandle = (DataSourceHandle) design.getDataSources()
          .get(0);

      // create a new report
      ReportDesignHandle reportDesign = session.createDesign();
      reportDesign.getDataSources().add(dataSourceHandle);

      // find the correct data set based on dateSetName
      int dataSetCount = 0;
      for (Iterator dataSetIterator = dataSetNames.iterator(); dataSetIterator
View Full Code Here

Examples of org.eclipse.birt.report.model.api.SessionHandle

    }
    catch( Exception ex ) {
      ex.printStackTrace();
    }

    SessionHandle session = engine.newSessionHandle(ULocale.ENGLISH);

    try {
      //open a design or a template
      designHandle = session.openDesign("d:/Data Store/Project/birt-demo/WebContent/birt/reports/test_report.rptdesign");

      designFactory = designHandle.getElementFactory();

      buildDataSource();
      buildDataSet(cols, fromClause);
View Full Code Here

Examples of org.eclipse.birt.report.model.api.SessionHandle

    } catch (Exception ex) {
      ex.printStackTrace();
    }

    SessionHandle session = engine.newSessionHandle(ULocale.ENGLISH);

    // Create a new report
    reportDesignHandle = session.createDesign();

    // Element factory is used to create instances of BIRT elements.
    elementFactory = reportDesignHandle.getElementFactory();

    createMasterPages();
View Full Code Here

Examples of org.enhydra.shark.api.internal.toolagent.SessionHandle

               throw e;
            } finally {
               SharkUtilities.releaseMappingTransaction(t);
            }
         }
         SessionHandle shandle=null;
         String tacn=(tad!=null) ? tad.getToolAgentClassName() : defaultToolAgentClassName;
         String uname=(tad!=null) ? tad.getUsername() : "";
         String pwd=(tad!=null) ? tad.getPassword() : "";
         String appN=(tad!=null) ? tad.getApplicationName() : "";
         Integer appM=(tad!=null) ? tad.getApplicationMode() : null;
         ToolAgent ta=SharkEngineManager.getInstance().
            getToolAgentFactory().
            createToolAgent(transaction,tacn);
         // try to connect to the tool agent
         try {
            shandle=ta.connect(transaction,uname,pwd,cus.getProperty("enginename","imaobihostrezube"),"");
         } catch (ConnectFailed cf) {
            cus.error("Activity"+activity.toString()+" - connection to Tool agent "+tacn+" failed !");
            throw cf;
         }

         String procId=activity.container(transaction).key(transaction);
         String actKey=activity.key(transaction);
         String assId=getAssignmentId(procId,actKey);

         // invoke the procedure with the specified parameters
         AppParameter[] aprs=(AppParameter[])parameters.toArray(
                                                                new AppParameter[parameters.size()]);
         ta.invokeApplication(transaction,
                              shandle.getHandle(),
                              appN,
                              procId,
                              assId,
                              aprs,
                              appM);
         long appStatus;


         appStatus=ta.requestAppStatus(transaction,
                                       shandle.getHandle(),
                                       procId,
                                       assId,
                                       aprs);
         if (appStatus==APP_STATUS_INVALID) {
            ta.disconnect(transaction,shandle);
View Full Code Here

Examples of org.enhydra.shark.api.internal.toolagent.SessionHandle

               throw e;
            } finally {
               SharkUtilities.releaseMappingTransaction(t);
            }
         }
         SessionHandle shandle=null;
         String tacn=(tad!=null) ? tad.getToolAgentClassName() : defaultToolAgentClassName;
         String uname=(tad!=null) ? tad.getUsername() : "";
         String pwd=(tad!=null) ? tad.getPassword() : "";
         String appN=(tad!=null) ? tad.getApplicationName() : "";
         Integer appM=(tad!=null) ? tad.getApplicationMode() : null;
         ToolAgent ta=SharkEngineManager.getInstance().
            getToolAgentFactory().
            createToolAgent(transaction,tacn);
         // try to connect to the tool agent
         try {
            shandle=ta.connect(transaction,uname,pwd,cus.getProperty("enginename","imaobihostrezube"),"");
         } catch (ConnectFailed cf) {
            cus.error("Activity"+activity.toString()+" - connection to Tool agent "+tacn+" failed !");
            throw cf;
         }

         String procId=activity.container(transaction).key(transaction);
         String actKey=activity.key(transaction);
         String assId=getAssignmentId(procId,actKey);

         // invoke the procedure with the specified parameters
         AppParameter[] aprs=(AppParameter[])parameters.toArray(
                                                                new AppParameter[parameters.size()]);
         ta.invokeApplication(transaction,
                              shandle.getHandle(),
                              appN,
                              procId,
                              assId,
                              aprs,
                              appM);
         long appStatus;


         appStatus=ta.requestAppStatus(transaction,
                                       shandle.getHandle(),
                                       procId,
                                       assId,
                                       aprs);
         if (appStatus==APP_STATUS_INVALID) {
            ta.disconnect(transaction,shandle);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.