Examples of executeStatement()


Examples of org.apache.hive.service.cli.CLIServiceClient.executeStatement()

  @Test
  public void testConnection() throws Exception {
    CLIServiceClient serviceClient = miniHS2.getServiceClient();
    SessionHandle sessHandle = serviceClient.openSession("foo", "bar");
    OperationHandle handle = serviceClient.executeStatement(sessHandle, "SELECT 1", confOverlay);
    Thread.sleep(7000);
    try {
      serviceClient.closeOperation(handle);
      fail("Operation should have been closed by timeout!");
    } catch (HiveSQLException e) {
View Full Code Here

Examples of org.apache.hive.service.cli.CLIServiceClient.executeStatement()

  @Test
  public void testConnection() throws Exception {
    String tableName = "TestHiveServer2TestConnection";
    CLIServiceClient serviceClient = miniHS2.getServiceClient();
    SessionHandle sessHandle = serviceClient.openSession("foo", "bar");
    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
    serviceClient.executeStatement(sessHandle, "CREATE TABLE " + tableName + " (id INT)", confOverlay);
    OperationHandle opHandle = serviceClient.executeStatement(sessHandle, "SHOW TABLES", confOverlay);
    RowSet rowSet = serviceClient.fetchResults(opHandle);
    assertFalse(rowSet.numRows() == 0);
    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
View Full Code Here

Examples of org.apache.hive.service.cli.CLIServiceClient.executeStatement()

  public void testConnection() throws Exception {
    String tableName = "TestHiveServer2TestConnection";
    CLIServiceClient serviceClient = miniHS2.getServiceClient();
    SessionHandle sessHandle = serviceClient.openSession("foo", "bar");
    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
    serviceClient.executeStatement(sessHandle, "CREATE TABLE " + tableName + " (id INT)", confOverlay);
    OperationHandle opHandle = serviceClient.executeStatement(sessHandle, "SHOW TABLES", confOverlay);
    RowSet rowSet = serviceClient.fetchResults(opHandle);
    assertFalse(rowSet.numRows() == 0);
    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
    serviceClient.closeSession(sessHandle);
View Full Code Here

Examples of org.apache.hive.service.cli.CLIServiceClient.executeStatement()

    String tableName = "TestHiveServer2TestConnection";
    CLIServiceClient serviceClient = miniHS2.getServiceClient();
    SessionHandle sessHandle = serviceClient.openSession("foo", "bar");
    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
    serviceClient.executeStatement(sessHandle, "CREATE TABLE " + tableName + " (id INT)", confOverlay);
    OperationHandle opHandle = serviceClient.executeStatement(sessHandle, "SHOW TABLES", confOverlay);
    RowSet rowSet = serviceClient.fetchResults(opHandle);
    assertFalse(rowSet.numRows() == 0);
    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
    serviceClient.closeSession(sessHandle);
  }
View Full Code Here

Examples of org.apache.hive.service.cli.CLIServiceClient.executeStatement()

    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
    serviceClient.executeStatement(sessHandle, "CREATE TABLE " + tableName + " (id INT)", confOverlay);
    OperationHandle opHandle = serviceClient.executeStatement(sessHandle, "SHOW TABLES", confOverlay);
    RowSet rowSet = serviceClient.fetchResults(opHandle);
    assertFalse(rowSet.numRows() == 0);
    serviceClient.executeStatement(sessHandle, "DROP TABLE IF EXISTS " + tableName, confOverlay);
    serviceClient.closeSession(sessHandle);
  }


  /**
 
View Full Code Here

Examples of org.apache.hive.service.cli.CLIServiceClient.executeStatement()

   */
  @Test
  public void testGetVariableValue() throws Exception {
    CLIServiceClient serviceClient = miniHS2.getServiceClient();
    SessionHandle sessHandle = serviceClient.openSession("foo", "bar");
    OperationHandle opHandle = serviceClient.executeStatement(sessHandle, "set system:os.name", confOverlay);
    RowSet rowSet = serviceClient.fetchResults(opHandle);
    assertEquals(1, rowSet.numRows());
    serviceClient.closeSession(sessHandle);
  }

View Full Code Here

Examples of org.dbpedia.downloader.connection.JDBC.executeStatement()

        String virtuosoPl = "sparql " + sparul + "";

        //jdbc.exec(virtuosoPl);
        PreparedStatement stmt = jdbc.prepare(virtuosoPl);
        return jdbc.executeStatement(stmt, new String[]{});
    }


    /**
     * Deletes the triples stored in the passed file from Virtuoso store
View Full Code Here

Examples of org.dbpedia.downloader.connection.JDBC.executeStatement()

        JDBC jdbc = JDBC.getDefaultConnection();

        String virtuosoPl = "sparql " + sparul + "";

        PreparedStatement stmt = jdbc.prepare(virtuosoPl);
        return jdbc.executeStatement(stmt, new String[]{});
    }

    /**
     * Removes the duplicated triples that may exist in
     * @param   triplesToClean  A string may contain duplicate triples
View Full Code Here

Examples of org.mule.transport.jdbc.sqlstrategy.SqlStatementStrategy.executeStatement()

        String statement = jdbcConnector.getStatement(endpoint);
        Object payload = event.getMessage().getPayload();
       
        SqlStatementStrategy strategy =
            jdbcConnector.getSqlStatementStrategyFactory().create(statement, payload);
        return strategy.executeStatement(jdbcConnector, endpoint, event, event.getTimeout());
    }

    @Override
    protected void doConnect() throws Exception
    {
View Full Code Here

Examples of org.mule.transport.jdbc.sqlstrategy.SqlStatementStrategy.executeStatement()

     */
    protected MuleMessage doRequest(long timeout, MuleEvent event) throws Exception
    {
        String statement = connector.getStatement(endpoint);
        SqlStatementStrategy strategy = connector.getSqlStatementStrategyFactory().create(statement, null);
        return strategy.executeStatement(connector, endpoint, event, timeout);       
    }


    @Override
    protected void doConnect() throws Exception
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.