@Test
  public void testQueryLogDisabled() throws Exception {
    OperationHandle operationHandle = client.executeStatement(sessionHandle,
            "set hive.server2.logging.operation.enabled=false", null);
    client.closeOperation(operationHandle);

    executeWithOperationLog(sqlCntStar, false);

    operationHandle = client.executeStatement(sessionHandle,
            "set hive.server2.logging.operation.enabled=true", null);
    client.closeOperation(operationHandle);
  }
Open a session, and create a table for cases usage

@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingLayout.java