Repository: tajo
Updated Branches:
  refs/heads/master 823508d79 -> 87e2a7a22


TAJO-2095: HiveCatalogStore::existIndexesByTable should not throw 
UnsupportedOperationException.

Closes #976


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/87e2a7a2
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/87e2a7a2
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/87e2a7a2

Branch: refs/heads/master
Commit: 87e2a7a22122d3d70b2f3aa83b09c2539426fdf7
Parents: 823508d
Author: Hyunsik Choi <[email protected]>
Authored: Wed Mar 16 10:20:44 2016 -0700
Committer: Hyunsik Choi <[email protected]>
Committed: Wed Mar 16 11:05:59 2016 -0700

----------------------------------------------------------------------
 .../tajo/catalog/store/HiveCatalogStore.java    | 56 ++++++++------------
 1 file changed, 21 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/87e2a7a2/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
----------------------------------------------------------------------
diff --git 
a/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
 
b/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
index 308cda5..63f18b6 100644
--- 
a/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
+++ 
b/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
@@ -1112,76 +1112,62 @@ public class HiveCatalogStore extends CatalogConstants 
implements CatalogStore {
 
   @Override
   public final void addFunction(final FunctionDesc func) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public final void deleteFunction(final FunctionDesc func) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public final void existFunction(final FunctionDesc func) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public final List<String> getAllFunctionNames() {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public void createIndex(CatalogProtos.IndexDescProto proto) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public void dropIndex(String databaseName, String indexName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public CatalogProtos.IndexDescProto getIndexByName(String databaseName, 
String indexName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
-  public CatalogProtos.IndexDescProto getIndexByColumns(String databaseName, 
String tableName, String[] columnNames)
-      {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+  public CatalogProtos.IndexDescProto getIndexByColumns(String databaseName, 
String tableName, String[] columnNames) {
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public boolean existIndexByName(String databaseName, String indexName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    return false;
   }
 
   @Override
-  public boolean existIndexByColumns(String databaseName, String tableName, 
String[] columnNames)
-      {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+  public boolean existIndexByColumns(String databaseName, String tableName, 
String[] columnNames) {
+    return false;
   }
 
   @Override
   public List<String> getAllIndexNamesByTable(String databaseName, String 
tableName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    return Collections.EMPTY_LIST;
   }
 
   @Override
   public boolean existIndexesByTable(String databaseName, String tableName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    return false;
   }
 
   @Override
@@ -1220,22 +1206,22 @@ public class HiveCatalogStore extends CatalogConstants 
implements CatalogStore {
 
   @Override
   public List<ColumnProto> getAllColumns() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<DatabaseProto> getAllDatabases() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<IndexDescProto> getAllIndexes() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<TablePartitionProto> getAllPartitions() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
@@ -1288,17 +1274,17 @@ public class HiveCatalogStore extends CatalogConstants 
implements CatalogStore {
 
   @Override
   public List<TableOptionProto> getAllTableProperties() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<TableStatsProto> getAllTableStats() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<TableDescriptorProto> getAllTables() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override

Reply via email to