예제 #1
0
 @Override
 public void runInternal() throws HiveSQLException {
   setState(OperationState.RUNNING);
   try {
     IMetaStoreClient metastoreClient = getParentSession().getMetaStoreClient();
     String schemaPattern = convertSchemaPattern(schemaName);
     for (String dbName : metastoreClient.getDatabases(schemaPattern)) {
       rowSet.addRow(new Object[] {dbName, DEFAULT_HIVE_CATALOG});
     }
     setState(OperationState.FINISHED);
   } catch (Exception e) {
     setState(OperationState.ERROR);
     throw new HiveSQLException(e);
   }
 }