Package org.apache.hive.service.cli

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


      throws HiveSQLException {
    acquire();

    OperationManager operationManager = getOperationManager();
    GetTypeInfoOperation operation = operationManager.newGetTypeInfoOperation(getSession());
    OperationHandle opHandle = operation.getHandle();
    try {
      operation.run();
      opHandleSet.add(opHandle);
      return opHandle;
    } catch (HiveSQLException e) {
View Full Code Here


      throws HiveSQLException {
    acquire();

    OperationManager operationManager = getOperationManager();
    GetCatalogsOperation operation = operationManager.newGetCatalogsOperation(getSession());
    OperationHandle opHandle = operation.getHandle();
    try {
      operation.run();
      opHandleSet.add(opHandle);
      return opHandle;
    } catch (HiveSQLException e) {
View Full Code Here

    acquire();

    OperationManager operationManager = getOperationManager();
    GetSchemasOperation operation =
        operationManager.newGetSchemasOperation(getSession(), catalogName, schemaName);
    OperationHandle opHandle = operation.getHandle();
    try {
      operation.run();
      opHandleSet.add(opHandle);
      return opHandle;
    } catch (HiveSQLException e) {
View Full Code Here

    acquire();

    OperationManager operationManager = getOperationManager();
    MetadataOperation operation =
        operationManager.newGetTablesOperation(getSession(), catalogName, schemaName, tableName, tableTypes);
    OperationHandle opHandle = operation.getHandle();
    try {
      operation.run();
      opHandleSet.add(opHandle);
      return opHandle;
    } catch (HiveSQLException e) {
View Full Code Here

      throws HiveSQLException {
    acquire();

    OperationManager operationManager = getOperationManager();
    GetTableTypesOperation operation = operationManager.newGetTableTypesOperation(getSession());
    OperationHandle opHandle = operation.getHandle();
    try {
      operation.run();
      opHandleSet.add(opHandle);
      return opHandle;
    } catch (HiveSQLException e) {
View Full Code Here

    acquire();

    OperationManager operationManager = getOperationManager();
    GetColumnsOperation operation = operationManager.newGetColumnsOperation(getSession(),
        catalogName, schemaName, tableName, columnName);
    OperationHandle opHandle = operation.getHandle();
    try {
      operation.run();
      opHandleSet.add(opHandle);
      return opHandle;
    } catch (HiveSQLException e) {
View Full Code Here

    acquire();

    OperationManager operationManager = getOperationManager();
    GetFunctionsOperation operation = operationManager
        .newGetFunctionsOperation(getSession(), catalogName, schemaName, functionName);
    OperationHandle opHandle = operation.getHandle();
    try {
      operation.run();
      opHandleSet.add(opHandle);
      return opHandle;
    } catch (HiveSQLException e) {
View Full Code Here

    OperationManager opMgr = new OperationManager();
    HiveSession session = new HiveSessionImpl("user", "passw", null);

    session.setOperationManager(opMgr);

    OperationHandle opHandle1 = session.executeStatement("use default", null);
    assertNotNull(opHandle1);
    assertEquals(OperationState.FINISHED, opMgr.getOperationState(opHandle1));

    OperationHandle opHandle2 = session.executeStatement("show databases", null);
    assertNotNull(opHandle2);
    assertEquals(OperationState.FINISHED, opMgr.getOperationState(opHandle2));

    session.closeOperation(opHandle1); // Don't close directly from opMgr!
View Full Code Here

  protected boolean hasResultSet;

  protected Operation(HiveSession parentSession, OperationType opType) {
    super();
    this.parentSession = parentSession;
    opHandle = new OperationHandle(opType);
  }
View Full Code Here

    acquire();
    try {
      ExecuteStatementOperation operation = getOperationManager()
          .newExecuteStatementOperation(getSession(), statement, confOverlay);
      operation.run();
      OperationHandle opHandle = operation.getHandle();
      opHandleSet.add(opHandle);
      return opHandle;
    } finally {
      release();
    }
View Full Code Here

TOP

Related Classes of org.apache.hive.service.cli.OperationHandle

Copyright © 2018 www.massapicom. 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.