You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by vi...@apache.org on 2018/12/24 17:27:07 UTC

[drill] 01/03: DRILL-6925: Unable to generate Protobuf

This is an automated email from the ASF dual-hosted git repository.

vitalii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git

commit 4a771d0af83beccbb0a7fc9f03b22966c1292724
Author: Vitalii Diravka <vi...@gmail.com>
AuthorDate: Sun Dec 23 22:51:15 2018 +0200

    DRILL-6925: Unable to generate Protobuf
    
    - use ${maven.multiModuleProjectDirectory}/header to find header file from any submodule
    - suppress UnresolvedMavenProperty, since IDE expects that property should be set explicitly
    - update "kr.motd.maven:os-maven-plugin" github.com/trustin/os-maven-plugin to the latest 1.6.1 version
    - correction of ${user.name} propery for "maven-jar-plugin" <Built-By>
    - update "apache-rat-plugin" to solve undefined "excludeSubprojects" in IDE
    - regenerate Java and C++ protobuf files
    
    closes #1585
---
 .mvn/extensions.xml                                |  2 +-
 contrib/native/client/src/protobuf/BitData.pb.cc   | 56 +++++++++++++++++++---
 contrib/native/client/src/protobuf/BitData.pb.h    | 34 ++++++++++++-
 .../org/apache/drill/exec/ssl/SSLConfigClient.java |  4 +-
 .../org/apache/drill/exec/ssl/SSLConfigServer.java |  4 +-
 pom.xml                                            | 10 ++--
 .../org/apache/drill/exec/proto/UserBitShared.java | 40 ++++++++++++++++
 7 files changed, 133 insertions(+), 17 deletions(-)

diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
index bf8c8c7..cee0598 100644
--- a/.mvn/extensions.xml
+++ b/.mvn/extensions.xml
@@ -22,6 +22,6 @@ under the License.
   <extension>
     <groupId>kr.motd.maven</groupId>
     <artifactId>os-maven-plugin</artifactId>
-    <version>1.5.0.Final</version>
+    <version>1.6.1</version>
   </extension>
 </extensions>
diff --git a/contrib/native/client/src/protobuf/BitData.pb.cc b/contrib/native/client/src/protobuf/BitData.pb.cc
index ddee323..df2207a 100644
--- a/contrib/native/client/src/protobuf/BitData.pb.cc
+++ b/contrib/native/client/src/protobuf/BitData.pb.cc
@@ -99,7 +99,7 @@ void protobuf_AssignDesc_BitData_2eproto() {
       ::google::protobuf::MessageFactory::generated_factory(),
       sizeof(FragmentRecordBatch));
   RuntimeFilterBDef_descriptor_ = file->message_type(3);
-  static const int RuntimeFilterBDef_offsets_[7] = {
+  static const int RuntimeFilterBDef_offsets_[8] = {
     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RuntimeFilterBDef, query_id_),
     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RuntimeFilterBDef, major_fragment_id_),
     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RuntimeFilterBDef, minor_fragment_id_),
@@ -107,6 +107,7 @@ void protobuf_AssignDesc_BitData_2eproto() {
     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RuntimeFilterBDef, bloom_filter_size_in_bytes_),
     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RuntimeFilterBDef, probe_fields_),
     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RuntimeFilterBDef, hj_op_id_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RuntimeFilterBDef, rf_identifier_),
   };
   RuntimeFilterBDef_reflection_ =
     new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -178,16 +179,17 @@ void protobuf_AddDesc_BitData_2eproto() {
     " \003(\005\022!\n\031sending_major_fragment_id\030\004 \001(\005\022"
     "!\n\031sending_minor_fragment_id\030\005 \001(\005\022(\n\003de"
     "f\030\006 \001(\0132\033.exec.shared.RecordBatchDef\022\023\n\013"
-    "isLastBatch\030\007 \001(\010\"\321\001\n\021RuntimeFilterBDef\022"
+    "isLastBatch\030\007 \001(\010\"\350\001\n\021RuntimeFilterBDef\022"
     "&\n\010query_id\030\001 \001(\0132\024.exec.shared.QueryId\022"
     "\031\n\021major_fragment_id\030\002 \001(\005\022\031\n\021minor_frag"
     "ment_id\030\003 \001(\005\022\022\n\nto_foreman\030\004 \001(\010\022\"\n\032blo"
     "om_filter_size_in_bytes\030\005 \003(\005\022\024\n\014probe_f"
-    "ields\030\006 \003(\t\022\020\n\010hj_op_id\030\007 \001(\005*n\n\007RpcType"
-    "\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\024\n"
-    "\020REQ_RECORD_BATCH\020\003\022\020\n\014SASL_MESSAGE\020\004\022\026\n"
-    "\022REQ_RUNTIME_FILTER\020\005B(\n\033org.apache.dril"
-    "l.exec.protoB\007BitDataH\001", 903);
+    "ields\030\006 \003(\t\022\020\n\010hj_op_id\030\007 \001(\005\022\025\n\rrf_iden"
+    "tifier\030\010 \001(\003*n\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007"
+    "\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\024\n\020REQ_RECORD_BATCH"
+    "\020\003\022\020\n\014SASL_MESSAGE\020\004\022\026\n\022REQ_RUNTIME_FILT"
+    "ER\020\005B(\n\033org.apache.drill.exec.protoB\007Bit"
+    "DataH\001", 926);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "BitData.proto", &protobuf_RegisterTypes);
   BitClientHandshake::default_instance_ = new BitClientHandshake();
@@ -1210,6 +1212,7 @@ const int RuntimeFilterBDef::kToForemanFieldNumber;
 const int RuntimeFilterBDef::kBloomFilterSizeInBytesFieldNumber;
 const int RuntimeFilterBDef::kProbeFieldsFieldNumber;
 const int RuntimeFilterBDef::kHjOpIdFieldNumber;
+const int RuntimeFilterBDef::kRfIdentifierFieldNumber;
 #endif  // !_MSC_VER
 
 RuntimeFilterBDef::RuntimeFilterBDef()
@@ -1234,6 +1237,7 @@ void RuntimeFilterBDef::SharedCtor() {
   minor_fragment_id_ = 0;
   to_foreman_ = false;
   hj_op_id_ = 0;
+  rf_identifier_ = GOOGLE_LONGLONG(0);
   ::memset(_has_bits_, 0, sizeof(_has_bits_));
 }
 
@@ -1277,6 +1281,7 @@ void RuntimeFilterBDef::Clear() {
     minor_fragment_id_ = 0;
     to_foreman_ = false;
     hj_op_id_ = 0;
+    rf_identifier_ = GOOGLE_LONGLONG(0);
   }
   bloom_filter_size_in_bytes_.Clear();
   probe_fields_.Clear();
@@ -1404,6 +1409,22 @@ bool RuntimeFilterBDef::MergePartialFromCodedStream(
         } else {
           goto handle_uninterpreted;
         }
+        if (input->ExpectTag(64)) goto parse_rf_identifier;
+        break;
+      }
+
+      // optional int64 rf_identifier = 8;
+      case 8: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_rf_identifier:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+                 input, &rf_identifier_)));
+          set_has_rf_identifier();
+        } else {
+          goto handle_uninterpreted;
+        }
         if (input->ExpectAtEnd()) return true;
         break;
       }
@@ -1467,6 +1488,11 @@ void RuntimeFilterBDef::SerializeWithCachedSizes(
     ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->hj_op_id(), output);
   }
 
+  // optional int64 rf_identifier = 8;
+  if (has_rf_identifier()) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->rf_identifier(), output);
+  }
+
   if (!unknown_fields().empty()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         unknown_fields(), output);
@@ -1517,6 +1543,11 @@ void RuntimeFilterBDef::SerializeWithCachedSizes(
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->hj_op_id(), target);
   }
 
+  // optional int64 rf_identifier = 8;
+  if (has_rf_identifier()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->rf_identifier(), target);
+  }
+
   if (!unknown_fields().empty()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         unknown_fields(), target);
@@ -1561,6 +1592,13 @@ int RuntimeFilterBDef::ByteSize() const {
           this->hj_op_id());
     }
 
+    // optional int64 rf_identifier = 8;
+    if (has_rf_identifier()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::Int64Size(
+          this->rf_identifier());
+    }
+
   }
   // repeated int32 bloom_filter_size_in_bytes = 5;
   {
@@ -1622,6 +1660,9 @@ void RuntimeFilterBDef::MergeFrom(const RuntimeFilterBDef& from) {
     if (from.has_hj_op_id()) {
       set_hj_op_id(from.hj_op_id());
     }
+    if (from.has_rf_identifier()) {
+      set_rf_identifier(from.rf_identifier());
+    }
   }
   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
 }
@@ -1652,6 +1693,7 @@ void RuntimeFilterBDef::Swap(RuntimeFilterBDef* other) {
     bloom_filter_size_in_bytes_.Swap(&other->bloom_filter_size_in_bytes_);
     probe_fields_.Swap(&other->probe_fields_);
     std::swap(hj_op_id_, other->hj_op_id_);
+    std::swap(rf_identifier_, other->rf_identifier_);
     std::swap(_has_bits_[0], other->_has_bits_[0]);
     _unknown_fields_.Swap(&other->_unknown_fields_);
     std::swap(_cached_size_, other->_cached_size_);
diff --git a/contrib/native/client/src/protobuf/BitData.pb.h b/contrib/native/client/src/protobuf/BitData.pb.h
index 7ee0bc6..9c9c42f 100644
--- a/contrib/native/client/src/protobuf/BitData.pb.h
+++ b/contrib/native/client/src/protobuf/BitData.pb.h
@@ -528,6 +528,13 @@ class RuntimeFilterBDef : public ::google::protobuf::Message {
   inline ::google::protobuf::int32 hj_op_id() const;
   inline void set_hj_op_id(::google::protobuf::int32 value);
 
+  // optional int64 rf_identifier = 8;
+  inline bool has_rf_identifier() const;
+  inline void clear_rf_identifier();
+  static const int kRfIdentifierFieldNumber = 8;
+  inline ::google::protobuf::int64 rf_identifier() const;
+  inline void set_rf_identifier(::google::protobuf::int64 value);
+
   // @@protoc_insertion_point(class_scope:exec.bit.data.RuntimeFilterBDef)
  private:
   inline void set_has_query_id();
@@ -540,6 +547,8 @@ class RuntimeFilterBDef : public ::google::protobuf::Message {
   inline void clear_has_to_foreman();
   inline void set_has_hj_op_id();
   inline void clear_has_hj_op_id();
+  inline void set_has_rf_identifier();
+  inline void clear_has_rf_identifier();
 
   ::google::protobuf::UnknownFieldSet _unknown_fields_;
 
@@ -550,9 +559,10 @@ class RuntimeFilterBDef : public ::google::protobuf::Message {
   bool to_foreman_;
   ::google::protobuf::int32 hj_op_id_;
   ::google::protobuf::RepeatedPtrField< ::std::string> probe_fields_;
+  ::google::protobuf::int64 rf_identifier_;
 
   mutable int _cached_size_;
-  ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
+  ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
 
   friend void  protobuf_AddDesc_BitData_2eproto();
   friend void protobuf_AssignDesc_BitData_2eproto();
@@ -1075,6 +1085,28 @@ inline void RuntimeFilterBDef::set_hj_op_id(::google::protobuf::int32 value) {
   hj_op_id_ = value;
 }
 
+// optional int64 rf_identifier = 8;
+inline bool RuntimeFilterBDef::has_rf_identifier() const {
+  return (_has_bits_[0] & 0x00000080u) != 0;
+}
+inline void RuntimeFilterBDef::set_has_rf_identifier() {
+  _has_bits_[0] |= 0x00000080u;
+}
+inline void RuntimeFilterBDef::clear_has_rf_identifier() {
+  _has_bits_[0] &= ~0x00000080u;
+}
+inline void RuntimeFilterBDef::clear_rf_identifier() {
+  rf_identifier_ = GOOGLE_LONGLONG(0);
+  clear_has_rf_identifier();
+}
+inline ::google::protobuf::int64 RuntimeFilterBDef::rf_identifier() const {
+  return rf_identifier_;
+}
+inline void RuntimeFilterBDef::set_rf_identifier(::google::protobuf::int64 value) {
+  set_has_rf_identifier();
+  rf_identifier_ = value;
+}
+
 
 // @@protoc_insertion_point(namespace_scope)
 
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java
index 1cc818c..681eb86 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java
@@ -67,9 +67,9 @@ public class SSLConfigClient extends SSLConfig {
     // the dependency on netty-tcnative with the correct classifier for the platform you use.
     // This can be done by enabling the openssl profile.
     // If the IDE is Eclipse, it requires you to install an additional Eclipse plugin available here:
-    // http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar
+    // http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.6.1/os-maven-plugin-1.6.1.jar
     // or from your local maven repository:
-    // ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar
+    // ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.6.1/os-maven-plugin-1.6.1.jar
     // Note that installing this plugin may require you to start with a new workspace
     provider = getStringProperty(DrillProperties.TLS_PROVIDER, DEFAULT_SSL_PROVIDER);
   }
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java
index 674df42..e0b8f54 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java
@@ -95,9 +95,9 @@ public class SSLConfigServer extends SSLConfig {
     // the dependency on netty-tcnative with the correct classifier for the platform you use.
     // This can be done by enabling the openssl profile.
     // If the IDE is Eclipse, it requires you to install an additional Eclipse plugin available here:
-    // http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar
+    // http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.6.1/os-maven-plugin-1.6.1.jar
     // or from your local maven repository:
-    // ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar
+    // ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.6.1/os-maven-plugin-1.6.1.jar
     // Note that installing this plugin may require you to start with a new workspace
     provider = getConfigParamWithDefault(ExecConstants.SSL_PROVIDER, DEFAULT_SSL_PROVIDER);
   }
diff --git a/pom.xml b/pom.xml
index e9b9693..97514f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -320,6 +320,7 @@
       <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
+        <version>0.13</version>
         <executions>
           <execution>
             <id>rat-checks</id>
@@ -446,7 +447,7 @@
             </manifest>
             <manifestEntries>
               <Extension-Name>org.apache.drill</Extension-Name>
-              <Built-By>${username}</Built-By>
+              <Built-By>${user.name}</Built-By>
               <url>http://drill.apache.org/</url>
             </manifestEntries>
           </archive>
@@ -587,7 +588,8 @@
           <version>3.0</version>
           <configuration>
             <aggregate>true</aggregate>
-            <header>header</header>
+            <!--suppress UnresolvedMavenProperty -->
+            <header>${maven.multiModuleProjectDirectory}/header</header>
             <excludes>
               <exclude>**/clientlib/y2038/*.c</exclude> <!-- All the files here should have MIT License -->
               <exclude>**/clientlib/y2038/*.h</exclude> <!-- All the files here should have MIT License -->
@@ -3349,9 +3351,9 @@
     <profile>
       <!--
         If the IDE is Eclipse, it requires you to install an additional Eclipse plugin available here:
-        http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar
+        http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.6.1/os-maven-plugin-1.6.1.jar
         or from your local maven repository:
-        ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar
+        ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.6.1/os-maven-plugin-1.6.1.jar
         Note that installing this plugin may require you to start with a new workspace
       -->
       <id>openssl</id>
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
index f969639..34fb47e 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
@@ -6800,10 +6800,20 @@ public final class UserBitShared {
     // optional int32 affected_rows_count = 4;
     /**
      * <code>optional int32 affected_rows_count = 4;</code>
+     *
+     * <pre>
+     * The value is set when result set is disabled and its value corresponds to number
+     * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+     * </pre>
      */
     boolean hasAffectedRowsCount();
     /**
      * <code>optional int32 affected_rows_count = 4;</code>
+     *
+     * <pre>
+     * The value is set when result set is disabled and its value corresponds to number
+     * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+     * </pre>
      */
     int getAffectedRowsCount();
   }
@@ -6997,12 +7007,22 @@ public final class UserBitShared {
     private int affectedRowsCount_;
     /**
      * <code>optional int32 affected_rows_count = 4;</code>
+     *
+     * <pre>
+     * The value is set when result set is disabled and its value corresponds to number
+     * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+     * </pre>
      */
     public boolean hasAffectedRowsCount() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
     /**
      * <code>optional int32 affected_rows_count = 4;</code>
+     *
+     * <pre>
+     * The value is set when result set is disabled and its value corresponds to number
+     * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+     * </pre>
      */
     public int getAffectedRowsCount() {
       return affectedRowsCount_;
@@ -7629,18 +7649,33 @@ public final class UserBitShared {
       private int affectedRowsCount_ ;
       /**
        * <code>optional int32 affected_rows_count = 4;</code>
+       *
+       * <pre>
+       * The value is set when result set is disabled and its value corresponds to number
+       * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+       * </pre>
        */
       public boolean hasAffectedRowsCount() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
       /**
        * <code>optional int32 affected_rows_count = 4;</code>
+       *
+       * <pre>
+       * The value is set when result set is disabled and its value corresponds to number
+       * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+       * </pre>
        */
       public int getAffectedRowsCount() {
         return affectedRowsCount_;
       }
       /**
        * <code>optional int32 affected_rows_count = 4;</code>
+       *
+       * <pre>
+       * The value is set when result set is disabled and its value corresponds to number
+       * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+       * </pre>
        */
       public Builder setAffectedRowsCount(int value) {
         bitField0_ |= 0x00000008;
@@ -7650,6 +7685,11 @@ public final class UserBitShared {
       }
       /**
        * <code>optional int32 affected_rows_count = 4;</code>
+       *
+       * <pre>
+       * The value is set when result set is disabled and its value corresponds to number
+       * of rows affected by query (see JDBC java.sql.ResultSet#getUpdateCount())
+       * </pre>
        */
       public Builder clearAffectedRowsCount() {
         bitField0_ = (bitField0_ & ~0x00000008);