Commit a86f0f3e by Venkatesh Seetharam

Add Hive Bridge with major refactoring

parent e747e2ae
...@@ -34,10 +34,22 @@ ...@@ -34,10 +34,22 @@
<properties> <properties>
<hive.version>0.14.0</hive.version> <hive.version>0.14.0</hive.version>
<hadoop.version>2.5.0</hadoop.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId>
<artifactId>metadata-client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId> <groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId> <artifactId>hive-metastore</artifactId>
<version>${hive.version}</version> <version>${hive.version}</version>
...@@ -96,11 +108,6 @@ ...@@ -96,11 +108,6 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
</dependency> </dependency>
......
...@@ -24,10 +24,10 @@ package org.apache.hadoop.metadata.hive.model; ...@@ -24,10 +24,10 @@ package org.apache.hadoop.metadata.hive.model;
public enum HiveDataTypes { public enum HiveDataTypes {
// Enums // Enums
HIVE_OBJECTTYPE, HIVE_OBJECT_TYPE,
HIVE_PRINCIPALTYPE, HIVE_PRINCIPAL_TYPE,
HIVE_RESOURCETYPE, HIVE_RESOURCE_TYPE,
HIVE_FUNCTIONTYPE, HIVE_FUNCTION_TYPE,
// Structs // Structs
HIVE_SERDE, HIVE_SERDE,
...@@ -47,4 +47,9 @@ public enum HiveDataTypes { ...@@ -47,4 +47,9 @@ public enum HiveDataTypes {
HIVE_TYPE, HIVE_TYPE,
HIVE_PROCESS, HIVE_PROCESS,
// HIVE_VIEW, // HIVE_VIEW,
;
public String getName() {
return name().toLowerCase();
}
} }
...@@ -46,6 +46,10 @@ import org.slf4j.LoggerFactory; ...@@ -46,6 +46,10 @@ import org.slf4j.LoggerFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
* todo - this needs to be removed.
*/
@Deprecated
public class HiveImporter { public class HiveImporter {
private static final Logger LOG = private static final Logger LOG =
...@@ -158,7 +162,7 @@ public class HiveImporter { ...@@ -158,7 +162,7 @@ public class HiveImporter {
LOG.debug("creating instance of type " + typeName + " dataType " + dataType); LOG.debug("creating instance of type " + typeName + " dataType " + dataType);
ITypedReferenceableInstance instance = ITypedReferenceableInstance instance =
(ITypedReferenceableInstance) dataType.convert(ref, Multiplicity.OPTIONAL); (ITypedReferenceableInstance) dataType.convert(ref, Multiplicity.OPTIONAL);
String guid = graphRepository.createEntity(instance, typeName); String guid = graphRepository.createEntity(instance);
System.out.println("creating instance of type " + typeName + " dataType " + dataType System.out.println("creating instance of type " + typeName + " dataType " + dataType
+ ", guid: " + guid); + ", guid: " + guid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment