You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2018/04/28 17:48:27 UTC

[4/4] hive git commit: HIVE-19288 : Implement protobuf logging hive hook. (Harish JP via Ashutosh Chauhan)

HIVE-19288 : Implement protobuf logging hive hook. (Harish JP via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


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

Branch: refs/heads/branch-3
Commit: e08cc6e6cd9eb501cf88ca4b777f1e0e8d46b281
Parents: 1b0b86c
Author: Harish Jaiprakash <hj...@hortonworks.com>
Authored: Sat Apr 28 10:47:09 2018 -0700
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Sat Apr 28 10:48:17 2018 -0700

----------------------------------------------------------------------
 .../hadoop/hive/llap/TestAsyncPbRpcProxy.java   |    4 +-
 ql/pom.xml                                      |   34 +
 .../hive/ql/hooks/proto/HiveHookEvents.java     | 2917 ++++++++++++++++++
 .../hive/ql/hooks/DatePartitionedLogger.java    |  167 +
 .../hive/ql/hooks/HiveProtoLoggingHook.java     |  493 +++
 .../hive/ql/hooks/ProtoMessageReader.java       |   66 +
 .../hive/ql/hooks/ProtoMessageWritable.java     |  101 +
 .../hive/ql/hooks/ProtoMessageWriter.java       |   71 +
 ql/src/protobuf/HiveEvents.proto                |   38 +
 .../hive/ql/hooks/TestHiveProtoLoggingHook.java |  170 +
 10 files changed, 4060 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e08cc6e6/llap-client/src/test/org/apache/hadoop/hive/llap/TestAsyncPbRpcProxy.java
----------------------------------------------------------------------
diff --git a/llap-client/src/test/org/apache/hadoop/hive/llap/TestAsyncPbRpcProxy.java b/llap-client/src/test/org/apache/hadoop/hive/llap/TestAsyncPbRpcProxy.java
index b152f1c..9abbbbe 100644
--- a/llap-client/src/test/org/apache/hadoop/hive/llap/TestAsyncPbRpcProxy.java
+++ b/llap-client/src/test/org/apache/hadoop/hive/llap/TestAsyncPbRpcProxy.java
@@ -112,7 +112,9 @@ public class TestAsyncPbRpcProxy {
       super(numThreads, 1);
     }
 
-    protected void submitToExecutor(LlapProtocolClientProxy.CallableRequest request, LlapNodeId nodeId) {
+    @Override
+    protected <T extends Message, U extends Message> void submitToExecutor(
+        LlapProtocolClientProxy.CallableRequest<T, U> request, LlapNodeId nodeId) {
       numSubmissionsCounters++;
       MutableInt nodeCount = numInvocationsPerNode.get(nodeId);
       if (nodeCount == null) {

http://git-wip-us.apache.org/repos/asf/hive/blob/e08cc6e6/ql/pom.xml
----------------------------------------------------------------------
diff --git a/ql/pom.xml b/ql/pom.xml
index 31b0a65..46ce96a 100644
--- a/ql/pom.xml
+++ b/ql/pom.xml
@@ -795,6 +795,39 @@
           </plugins>
        </build>
     </profile>
+    <profile>
+      <id>protobuf</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>generate-protobuf-sources</id>
+                <phase>generate-sources</phase>
+                <configuration>
+                  <target>
+                    <property name="protobuf.src.dir"  location="${basedir}/src/protobuf"/>
+                    <property name="protobuf.build.dir"  location="${basedir}/src/gen/protobuf/gen-java"/>
+                    <echo>Building ql Protobuf</echo>
+                    <mkdir dir="${protobuf.build.dir}"/>
+                    <exec executable="protoc" failonerror="true">
+                      <arg value="--java_out=${protobuf.build.dir}"/>
+                      <arg value="-I=${protobuf.src.dir}"/>
+                      <arg value="${protobuf.src.dir}/HiveEvents.proto"/>
+                    </exec>
+                  </target>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 
   <build>
@@ -957,6 +990,7 @@
               <sources>
                 <source>src/gen/thrift/gen-javabean</source>
                 <source>${project.build.directory}/generated-sources/java</source>
+                <source>src/gen/protobuf/gen-java</source>
               </sources>
             </configuration>
           </execution>