lihuigang / hive-bitmap-udf

在hive中使用Roaring64Bitmap实现精确去重功能
Apache License 2.0
67 stars 33 forks source link

请问项目如何打包 #1

Closed PoetLiu closed 8 months ago

PoetLiu commented 1 year ago

项目使用maven package之后,将hive-bitmap-udf-jar-with-dependencies.jar文件上传到hive,执行bitmap_and等方法时,客户端报错退出: 0: jdbc:hive2://10.99.201.254:10000/> SELECT id, create_timestamp, bitmap_and(bitmap,bitmap) from bitmap where create_timestamp = 1682587042051; INFO : Compiling command(queryId=work_20230505165408_6f560925-c0a1-4957-ba1d-8987832dc9e2): SELECT id, create_timestamp, bitmap_and(bitmap,bitmap) from bitmap where create_timestamp = 1682587042051 INFO : Concurrency mode is disabled, not creating a lock manager INFO : Semantic Analysis Completed (retrial = false) INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:crowd_id, type:bigint, comment:null), FieldSchema(name:create_timestamp, type:bigint, comment:null), FieldSchema(name:_c2, type:binary, comment:null)], properties:null) INFO : Completed compiling command(queryId=work_20230505165408_6f560925-c0a1-4957-ba1d-8987832dc9e2); Time taken: 0.053 seconds INFO : Concurrency mode is disabled, not creating a lock manager INFO : Executing command(queryId=work_20230505165408_6f560925-c0a1-4957-ba1d-8987832dc9e2): SELECT id, create_timestamp, bitmap_and(bitmap,bitmap) from bitmap where create_timestamp = 1682587042051 INFO : Completed executing command(queryId=work_20230505165408_6f560925-c0a1-4957-ba1d-8987832dc9e2); Time taken: 0.0 seconds INFO : OK INFO : Concurrency mode is disabled, not creating a lock manager org.apache.thrift.transport.TTransportException at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) at org.apache.thrift.transport.TSaslTransport.readLength(TSaslTransport.java:376) at org.apache.thrift.transport.TSaslTransport.readFrame(TSaslTransport.java:453) at org.apache.thrift.transport.TSaslTransport.read(TSaslTransport.java:435) at org.apache.thrift.transport.TSaslClientTransport.read(TSaslClientTransport.java:37) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429) at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318) at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:77) at org.apache.hive.service.rpc.thrift.TCLIService$Client.recv_FetchResults(TCLIService.java:567) at org.apache.hive.service.rpc.thrift.TCLIService$Client.FetchResults(TCLIService.java:554) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1585) at com.sun.proxy.$Proxy19.FetchResults(Unknown Source) at org.apache.hive.jdbc.HiveQueryResultSet.next(HiveQueryResultSet.java:373) at org.apache.hive.beeline.BufferedRows.(BufferedRows.java:56) at org.apache.hive.beeline.IncrementalRowsWithNormalization.(IncrementalRowsWithNormalization.java:50) at org.apache.hive.beeline.BeeLine.print(BeeLine.java:2250) at org.apache.hive.beeline.Commands.executeInternal(Commands.java:1026) at org.apache.hive.beeline.Commands.execute(Commands.java:1201) at org.apache.hive.beeline.Commands.sql(Commands.java:1130) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1425) at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1287) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1071) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:538) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:520) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.hadoop.util.RunJar.run(RunJar.java:323) at org.apache.hadoop.util.RunJar.main(RunJar.java:236) Unknown HS2 problem when communicating with Thrift server. Error: org.apache.thrift.transport.TTransportException: java.net.SocketException: Broken pipe (state=08S01,code=0)

请问项目如何正确打包?

lihuigang commented 1 year ago

打包用 mvn clean package 感觉报错和这个udf没有关系。

lihuigang commented 8 months ago

mvn clean package 打包后使用 hive-bitmap-udf.jar 这个jar包