calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcama...@apache.org
Subject [09/50] [abbrv] calcite git commit: [CALCITE-908] Bump protobuf to 3.0.0-beta-1, fix deprecations and update docs (Josh Elser)
Date Wed, 11 Nov 2015 12:25:15 GMT
http://git-wip-us.apache.org/repos/asf/calcite/blob/86610552/avatica/src/main/java/org/apache/calcite/avatica/remote/ProtobufTranslationImpl.java
----------------------------------------------------------------------
diff --git a/avatica/src/main/java/org/apache/calcite/avatica/remote/ProtobufTranslationImpl.java
b/avatica/src/main/java/org/apache/calcite/avatica/remote/ProtobufTranslationImpl.java
index a121ad3..31d522d 100644
--- a/avatica/src/main/java/org/apache/calcite/avatica/remote/ProtobufTranslationImpl.java
+++ b/avatica/src/main/java/org/apache/calcite/avatica/remote/ProtobufTranslationImpl.java
@@ -71,71 +71,73 @@ public class ProtobufTranslationImpl implements ProtobufTranslation {
   static {
     HashMap<String, RequestTranslator> reqParsers = new HashMap<>();
     reqParsers.put(CatalogsRequest.class.getName(),
-        new RequestTranslator(CatalogsRequest.PARSER, new Service.CatalogsRequest()));
+        new RequestTranslator(CatalogsRequest.parser(), new Service.CatalogsRequest()));
     reqParsers.put(OpenConnectionRequest.class.getName(),
-        new RequestTranslator(OpenConnectionRequest.PARSER, new Service.OpenConnectionRequest()));
+        new RequestTranslator(OpenConnectionRequest.parser(), new Service.OpenConnectionRequest()));
     reqParsers.put(CloseConnectionRequest.class.getName(),
-        new RequestTranslator(CloseConnectionRequest.PARSER, new Service.CloseConnectionRequest()));
+        new RequestTranslator(CloseConnectionRequest.parser(),
+          new Service.CloseConnectionRequest()));
     reqParsers.put(CloseStatementRequest.class.getName(),
-        new RequestTranslator(CloseStatementRequest.PARSER, new Service.CloseStatementRequest()));
+        new RequestTranslator(CloseStatementRequest.parser(), new Service.CloseStatementRequest()));
     reqParsers.put(ColumnsRequest.class.getName(),
-        new RequestTranslator(ColumnsRequest.PARSER, new Service.ColumnsRequest()));
+        new RequestTranslator(ColumnsRequest.parser(), new Service.ColumnsRequest()));
     reqParsers.put(ConnectionSyncRequest.class.getName(),
-        new RequestTranslator(ConnectionSyncRequest.PARSER, new Service.ConnectionSyncRequest()));
+        new RequestTranslator(ConnectionSyncRequest.parser(), new Service.ConnectionSyncRequest()));
     reqParsers.put(CreateStatementRequest.class.getName(),
-        new RequestTranslator(CreateStatementRequest.PARSER, new Service.CreateStatementRequest()));
+        new RequestTranslator(CreateStatementRequest.parser(),
+          new Service.CreateStatementRequest()));
     reqParsers.put(DatabasePropertyRequest.class.getName(),
-        new RequestTranslator(DatabasePropertyRequest.PARSER,
+        new RequestTranslator(DatabasePropertyRequest.parser(),
             new Service.DatabasePropertyRequest()));
     reqParsers.put(FetchRequest.class.getName(),
-        new RequestTranslator(FetchRequest.PARSER, new Service.FetchRequest()));
+        new RequestTranslator(FetchRequest.parser(), new Service.FetchRequest()));
     reqParsers.put(PrepareAndExecuteRequest.class.getName(),
-        new RequestTranslator(PrepareAndExecuteRequest.PARSER,
+        new RequestTranslator(PrepareAndExecuteRequest.parser(),
             new Service.PrepareAndExecuteRequest()));
     reqParsers.put(PrepareRequest.class.getName(),
-        new RequestTranslator(PrepareRequest.PARSER, new Service.PrepareRequest()));
+        new RequestTranslator(PrepareRequest.parser(), new Service.PrepareRequest()));
     reqParsers.put(SchemasRequest.class.getName(),
-        new RequestTranslator(SchemasRequest.PARSER, new Service.SchemasRequest()));
+        new RequestTranslator(SchemasRequest.parser(), new Service.SchemasRequest()));
     reqParsers.put(TablesRequest.class.getName(),
-        new RequestTranslator(TablesRequest.PARSER, new Service.TablesRequest()));
+        new RequestTranslator(TablesRequest.parser(), new Service.TablesRequest()));
     reqParsers.put(TableTypesRequest.class.getName(),
-        new RequestTranslator(TableTypesRequest.PARSER, new Service.TableTypesRequest()));
+        new RequestTranslator(TableTypesRequest.parser(), new Service.TableTypesRequest()));
     reqParsers.put(TypeInfoRequest.class.getName(),
-        new RequestTranslator(TypeInfoRequest.PARSER, new Service.TypeInfoRequest()));
+        new RequestTranslator(TypeInfoRequest.parser(), new Service.TypeInfoRequest()));
     reqParsers.put(ExecuteRequest.class.getName(),
-        new RequestTranslator(ExecuteRequest.PARSER, new Service.ExecuteRequest()));
+        new RequestTranslator(ExecuteRequest.parser(), new Service.ExecuteRequest()));
 
     REQUEST_PARSERS = Collections.unmodifiableMap(reqParsers);
 
     HashMap<String, ResponseTranslator> respParsers = new HashMap<>();
     respParsers.put(OpenConnectionResponse.class.getName(),
-        new ResponseTranslator(OpenConnectionResponse.PARSER,
+        new ResponseTranslator(OpenConnectionResponse.parser(),
             new Service.OpenConnectionResponse()));
     respParsers.put(CloseConnectionResponse.class.getName(),
-        new ResponseTranslator(CloseConnectionResponse.PARSER,
+        new ResponseTranslator(CloseConnectionResponse.parser(),
             new Service.CloseConnectionResponse()));
     respParsers.put(CloseStatementResponse.class.getName(),
-        new ResponseTranslator(CloseStatementResponse.PARSER,
+        new ResponseTranslator(CloseStatementResponse.parser(),
             new Service.CloseStatementResponse()));
     respParsers.put(ConnectionSyncResponse.class.getName(),
-        new ResponseTranslator(ConnectionSyncResponse.PARSER,
+        new ResponseTranslator(ConnectionSyncResponse.parser(),
             new Service.ConnectionSyncResponse()));
     respParsers.put(CreateStatementResponse.class.getName(),
-        new ResponseTranslator(CreateStatementResponse.PARSER,
+        new ResponseTranslator(CreateStatementResponse.parser(),
             new Service.CreateStatementResponse()));
     respParsers.put(DatabasePropertyResponse.class.getName(),
-        new ResponseTranslator(DatabasePropertyResponse.PARSER,
+        new ResponseTranslator(DatabasePropertyResponse.parser(),
             new Service.DatabasePropertyResponse()));
     respParsers.put(ExecuteResponse.class.getName(),
-        new ResponseTranslator(ExecuteResponse.PARSER, new Service.ExecuteResponse()));
+        new ResponseTranslator(ExecuteResponse.parser(), new Service.ExecuteResponse()));
     respParsers.put(FetchResponse.class.getName(),
-        new ResponseTranslator(FetchResponse.PARSER, new Service.FetchResponse()));
+        new ResponseTranslator(FetchResponse.parser(), new Service.FetchResponse()));
     respParsers.put(PrepareResponse.class.getName(),
-        new ResponseTranslator(PrepareResponse.PARSER, new Service.PrepareResponse()));
+        new ResponseTranslator(PrepareResponse.parser(), new Service.PrepareResponse()));
     respParsers.put(ResultSetResponse.class.getName(),
-        new ResponseTranslator(ResultSetResponse.PARSER, new Service.ResultSetResponse()));
+        new ResponseTranslator(ResultSetResponse.parser(), new Service.ResultSetResponse()));
     respParsers.put(ErrorResponse.class.getName(),
-        new ResponseTranslator(ErrorResponse.PARSER, new Service.ErrorResponse()));
+        new ResponseTranslator(ErrorResponse.parser(), new Service.ErrorResponse()));
 
     RESPONSE_PARSERS = Collections.unmodifiableMap(respParsers);
   }

http://git-wip-us.apache.org/repos/asf/calcite/blob/86610552/avatica/src/test/java/org/apache/calcite/avatica/remote/ProtobufTranslationImplTest.java
----------------------------------------------------------------------
diff --git a/avatica/src/test/java/org/apache/calcite/avatica/remote/ProtobufTranslationImplTest.java
b/avatica/src/test/java/org/apache/calcite/avatica/remote/ProtobufTranslationImplTest.java
index d385054..0db48ab 100644
--- a/avatica/src/test/java/org/apache/calcite/avatica/remote/ProtobufTranslationImplTest.java
+++ b/avatica/src/test/java/org/apache/calcite/avatica/remote/ProtobufTranslationImplTest.java
@@ -230,7 +230,7 @@ public class ProtobufTranslationImplTest<T> {
 
     // Stub out the metadata for a row
     List<ColumnMetaData> columns =
-        Arrays.<ColumnMetaData>asList(MetaImpl.columnMetaData("str", 0, String.class),
+        Arrays.asList(MetaImpl.columnMetaData("str", 0, String.class),
             MetaImpl.columnMetaData("count", 1, Integer.class));
     List<AvaticaParameter> params =
         Arrays.asList(
@@ -278,9 +278,10 @@ public class ProtobufTranslationImplTest<T> {
 
     StringWriter sw = new StringWriter();
     new Exception().printStackTrace(new PrintWriter(sw));
-    responses.add(new ErrorResponse(Collections.singletonList(sw.toString()), "Test Error
Message",
-        ErrorResponse.UNKNOWN_ERROR_CODE, ErrorResponse.UNKNOWN_SQL_STATE,
-        AvaticaSeverity.WARNING));
+    responses.add(
+        new ErrorResponse(Collections.singletonList(sw.toString()), "Test Error Message",
+            ErrorResponse.UNKNOWN_ERROR_CODE, ErrorResponse.UNKNOWN_SQL_STATE,
+            AvaticaSeverity.WARNING));
 
     return responses;
   }

http://git-wip-us.apache.org/repos/asf/calcite/blob/86610552/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ae53317..b7d1c6a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -160,7 +160,7 @@ limitations under the License.
       <dependency>
         <groupId>com.google.protobuf</groupId>
         <artifactId>protobuf-java</artifactId>
-        <version>3.0.0-alpha-2</version>
+        <version>3.0.0-beta-1</version>
       </dependency>
       <dependency>
         <groupId>com.h2database</groupId>

http://git-wip-us.apache.org/repos/asf/calcite/blob/86610552/site/_docs/howto.md
----------------------------------------------------------------------
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
index d074fb9..af33cdd 100644
--- a/site/_docs/howto.md
+++ b/site/_docs/howto.md
@@ -397,8 +397,8 @@ need to be re-generated only every build, only when the schema changes.
 First, install Protobuf 3.0:
 
 {% highlight bash %}
-$ wget https://github.com/google/protobuf/releases/download/v3.0.0-alpha-2/protobuf-java-3.0.0-alpha-2.tar.gz
-$ tar xf protobuf-java-3.0.0-alpha-2.tar.gz && cd protobuf-3.0.0-alpha-2
+$ wget https://github.com/google/protobuf/releases/download/v3.0.0-beta-1/protobuf-java-3.0.0-beta-1.tar.gz
+$ tar xf protobuf-java-3.0.0-beta-1.tar.gz && cd protobuf-3.0.0-beta-1
 $ ./configure
 $ make
 $ sudo make install


Mime
View raw message