Repository: tajo Updated Branches: refs/heads/master 4bed490dd -> 513aff422
TAJO-1883: Keep tajo-client and its dependent modules to be 1.7 target. Closes #778 Project: http://git-wip-us.apache.org/repos/asf/tajo/repo Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/513aff42 Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/513aff42 Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/513aff42 Branch: refs/heads/master Commit: 513aff422aa362ed5bc485274fba837497a9f11d Parents: 4bed490 Author: Hyunsik Choi <[email protected]> Authored: Tue Oct 6 21:35:36 2015 -0700 Committer: Hyunsik Choi <[email protected]> Committed: Tue Oct 6 21:35:36 2015 -0700 ---------------------------------------------------------------------- BUILDING | 30 +++++++++------ CHANGES | 3 ++ README | 2 +- tajo-catalog/tajo-catalog-common/pom.xml | 5 +++ .../org/apache/tajo/catalog/DDLBuilder.java | 39 +++++++++++--------- tajo-client-example/pom.xml | 4 ++ tajo-client/pom.xml | 5 +++ .../org/apache/tajo/jdbc/TajoResultSetBase.java | 10 ++--- tajo-common/pom.xml | 5 +++ tajo-docs/src/main/sphinx/getting_started.rst | 2 +- tajo-jdbc/pom.xml | 5 +++ .../org/apache/tajo/jdbc/JdbcConnection.java | 7 ++-- .../apache/tajo/jdbc/TajoDatabaseMetaData.java | 4 +- .../java/org/apache/tajo/jdbc/TajoDriver.java | 2 +- .../org/apache/tajo/jdbc/TajoStatement.java | 4 +- tajo-rpc/tajo-rpc-common/pom.xml | 4 ++ tajo-rpc/tajo-rpc-protobuf/pom.xml | 5 +++ tajo-storage/tajo-storage-jdbc/pom.xml | 5 --- tajo-thirdparty/asm/pom.xml | 4 ++ 19 files changed, 95 insertions(+), 50 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/BUILDING ---------------------------------------------------------------------- diff --git a/BUILDING b/BUILDING index 4c5f23a..4ffe44e 100644 --- a/BUILDING +++ b/BUILDING @@ -4,7 +4,7 @@ Build instructions for Tajo Requirements: * Unix System -* JDK 1.7 or higher +* JDK 1.8 or higher * Maven 3.0 or higher * Protocol Buffers 2.5.0 * Internet connection for first build (to fetch all Maven and Tajo dependencies) @@ -15,18 +15,23 @@ Maven main modules: tajo (Main Tajo project) - tajo-project (Parent POM for all Tajo Maven modules. ) (All plugins & dependencies versions are defined here.) - - tajo-algebra - - tajo-common - - tajo-rpc - - tajo-catalog - - tajo-storage - - tajo-pullserver - - tajo-core - - tajo-client - - tajo-jdbc - - tajo-maven-plugin - - tajo-docs + - tajo-algebra (Algebraic expressions) + - tajo-catalog (Catalog and its plugins) + - tajo-common (Common modules) + - tajo-core (Core module) + - tajo-core-tests (Tests for core module and query execution) + - tajo-client (Client API and its implementation) + - tajo-client-example (Client API examples) - tajo-dist (Tajo distribution assembler) + - tajo-docs (User documentation) + - tajo-jdbc (Tajo JDBC Driver) + - tajo-maven-plugin (Maven Plugin) + - tajo-metrics (Metrics) + - tajo-plan (Plan representation) + - tajo-pullserver (Pullserver for intermediate) + - tajo-rpc (Rpc) + - tajo-sql-parser (SQL parser) + - tajo-storage (Storage and its plugins) -------------------------------------------------------------------------------- Maven build goals: @@ -53,6 +58,7 @@ Maven build goals: * -Dtest=<TESTCLASSNAME>,<TESTCLASSNAME#METHODNAME>,.... * -Dtest.exclude=<TESTCLASSNAME> * -Dtest.exclude.pattern=**/<TESTCLASSNAME1>.java,**/<TESTCLASSNAME2>.java + * For more information, refer to https://cwiki.apache.org/confluence/display/TAJO/Unit+Tests. -------------------------------------------------------------------------------- Building distributions: http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 768e953..a2f87a4 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,9 @@ Release 0.12.0 - unreleased IMPROVEMENT + TAJO-1883: Keep tajo-client and its dependent modules to be 1.7 target. + (hyunsik) + TAJO-1899: Calling 'Arrays.asList()' with too few arguments cause memory extravagance. (Contributed by Dongkyu Hwangbo, committed by jihoon) http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/README ---------------------------------------------------------------------- diff --git a/README b/README index 07f8f24..1cd3560 100644 --- a/README +++ b/README @@ -31,7 +31,7 @@ Documents Requirements ============ -* Java 1.7 or higher +* Java 1.8 or higher * Hadoop 2.3.0 or higher Mailing lists http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-catalog/tajo-catalog-common/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-catalog/tajo-catalog-common/pom.xml b/tajo-catalog/tajo-catalog-common/pom.xml index 0250bac..d275600 100644 --- a/tajo-catalog/tajo-catalog-common/pom.xml +++ b/tajo-catalog/tajo-catalog-common/pom.xml @@ -38,6 +38,11 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <target>1.7</target> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java ---------------------------------------------------------------------- diff --git a/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java b/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java index a5923cf..38ffc96 100644 --- a/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java +++ b/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java @@ -18,15 +18,17 @@ package org.apache.tajo.catalog; +import com.google.common.base.Function; import org.apache.tajo.catalog.partition.PartitionMethodDesc; import org.apache.tajo.catalog.proto.CatalogProtos.PartitionDescProto; import org.apache.tajo.util.KeyValueSet; +import org.apache.tajo.util.StringUtils; -import java.util.Comparator; import java.io.File; +import java.util.Arrays; +import java.util.Comparator; import java.util.List; import java.util.Map.Entry; -import java.util.function.Consumer; public class DDLBuilder { @@ -123,21 +125,24 @@ public class DDLBuilder { sb.append(" WITH ("); - meta.getOptions().getAllKeyValus().entrySet().stream() - .sorted(Comparator.comparing(e -> e.getKey())) // sort them for a determined table property string. - .forEach(new Consumer<Entry<String, String>>() { - boolean first = true; - - @Override - public void accept(Entry<String, String> e) { - if (first) { - first = false; - } else { - sb.append(", "); - } - sb.append("'").append(e.getKey()).append("'='").append(e.getValue()).append("'"); - } - }); + // sort table properties in an lexicographic order of the property keys. + Entry<String, String> [] entries = meta.getOptions().getAllKeyValus().entrySet().toArray( + new Entry[meta.getOptions().size()]); + + Arrays.sort(entries, new Comparator<Entry<String, String>>() { + @Override + public int compare(Entry<String, String> o1, Entry<String, String> o2) { + return o1.getKey().compareTo(o2.getKey()); + } + }); + + // Join all properties by comma (',') + sb.append(StringUtils.join(entries, ", ", new Function<Entry<String, String>, String>() { + @Override + public String apply(Entry<String, String> e) { + return "'" + e.getKey() + "'='" + e.getValue() + "'"; + } + })); sb.append(")"); } http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-client-example/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-client-example/pom.xml b/tajo-client-example/pom.xml index 7db1129..d531f57 100644 --- a/tajo-client-example/pom.xml +++ b/tajo-client-example/pom.xml @@ -50,6 +50,10 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> + <target>1.7</target> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-client/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-client/pom.xml b/tajo-client/pom.xml index e9f03ed..015cbc7 100644 --- a/tajo-client/pom.xml +++ b/tajo-client/pom.xml @@ -50,6 +50,11 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <target>1.7</target> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSetBase.java ---------------------------------------------------------------------- diff --git a/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSetBase.java b/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSetBase.java index a8d1239..5cc4309 100644 --- a/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSetBase.java +++ b/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSetBase.java @@ -569,15 +569,13 @@ public abstract class TajoResultSetBase implements ResultSet { throw new SQLFeatureNotSupportedException("getObject not supported"); } - public <T> T getObject(String name, Class<T> x) - throws SQLException { - //JDK 1.7 + @Override + public <T> T getObject(String name, Class<T> x) throws SQLException { throw new SQLFeatureNotSupportedException("getObject not supported"); } - public <T> T getObject(int index, Class<T> x) - throws SQLException { - //JDK 1.7 + @Override + public <T> T getObject(int index, Class<T> x) throws SQLException { throw new SQLFeatureNotSupportedException("getObject not supported"); } http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-common/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-common/pom.xml b/tajo-common/pom.xml index 2376575..70fb08b 100644 --- a/tajo-common/pom.xml +++ b/tajo-common/pom.xml @@ -91,6 +91,11 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <target>1.7</target> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-docs/src/main/sphinx/getting_started.rst ---------------------------------------------------------------------- diff --git a/tajo-docs/src/main/sphinx/getting_started.rst b/tajo-docs/src/main/sphinx/getting_started.rst index a328261..9a20b68 100644 --- a/tajo-docs/src/main/sphinx/getting_started.rst +++ b/tajo-docs/src/main/sphinx/getting_started.rst @@ -9,7 +9,7 @@ Prerequisites ====================== * Hadoop 2.3.0 or higher (up to 2.6.0) - * Java 1.7 or higher + * Java 1.8 or higher * Protocol buffer 2.5.0 =================================== http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-jdbc/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-jdbc/pom.xml b/tajo-jdbc/pom.xml index 686c14f..1b852d1 100644 --- a/tajo-jdbc/pom.xml +++ b/tajo-jdbc/pom.xml @@ -49,6 +49,11 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <target>1.7</target> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java ---------------------------------------------------------------------- diff --git a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java index e426dc5..c3c216d 100644 --- a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java +++ b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java @@ -433,24 +433,25 @@ public class JdbcConnection implements Connection { } public void abort(Executor executor) throws SQLException { - // JDK 1.7 throw new SQLFeatureNotSupportedException("abort is not supported"); } + @Override public int getNetworkTimeout() throws SQLException { - // JDK 1.7 throw new SQLFeatureNotSupportedException("getNetworkTimeout is not supported"); } + @Override public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { - // JDK 1.7 throw new SQLFeatureNotSupportedException("setNetworkTimeout not supported"); } + @Override public String getSchema() throws SQLException { return TajoConstants.DEFAULT_SCHEMA_NAME; } + @Override public void setSchema(String schema) throws SQLException { throw new SQLFeatureNotSupportedException("setSchema() is not supported yet"); } http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java ---------------------------------------------------------------------- diff --git a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java index 170a053..f9358a4 100644 --- a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java +++ b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java @@ -1256,14 +1256,14 @@ public class TajoDatabaseMetaData implements DatabaseMetaData { return iface.isInstance(this); } + @Override public boolean generatedKeyAlwaysReturned() throws SQLException { - // JDK 1.7 return false; } + @Override public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { - // JDK 1.7 throw new SQLFeatureNotSupportedException("getPseudoColumns not supported"); } } http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDriver.java ---------------------------------------------------------------------- diff --git a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDriver.java b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDriver.java index 3190f5a..56887d6 100644 --- a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDriver.java +++ b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDriver.java @@ -76,8 +76,8 @@ public class TajoDriver implements Driver, Closeable { return false; } + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { - // JDK 1.7 throw new SQLFeatureNotSupportedException("getParentLogger not supported"); } } http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java ---------------------------------------------------------------------- diff --git a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java index 6039e9c..7ecef45 100644 --- a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java +++ b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java @@ -109,8 +109,8 @@ public class TajoStatement implements Statement { isClosed = true; } + @Override public void closeOnCompletion() throws SQLException { - // JDK 1.7 throw new SQLFeatureNotSupportedException("closeOnCompletion() is not supported yet."); } @@ -292,8 +292,8 @@ public class TajoStatement implements Statement { return isClosed; } + @Override public boolean isCloseOnCompletion() throws SQLException { - // JDK 1.7 throw new SQLFeatureNotSupportedException("isCloseOnCompletion() is not supported yet."); } http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-rpc/tajo-rpc-common/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-rpc/tajo-rpc-common/pom.xml b/tajo-rpc/tajo-rpc-common/pom.xml index e7cbade..187d2ff 100644 --- a/tajo-rpc/tajo-rpc-common/pom.xml +++ b/tajo-rpc/tajo-rpc-common/pom.xml @@ -34,6 +34,10 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> + <target>1.7</target> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-rpc/tajo-rpc-protobuf/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-rpc/tajo-rpc-protobuf/pom.xml b/tajo-rpc/tajo-rpc-protobuf/pom.xml index 4c62ffd..4335d6a 100644 --- a/tajo-rpc/tajo-rpc-protobuf/pom.xml +++ b/tajo-rpc/tajo-rpc-protobuf/pom.xml @@ -34,6 +34,11 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <target>1.7</target> <!-- for keeping tajo-client and tajo-jdbc available in 1.7--> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-storage/tajo-storage-jdbc/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-jdbc/pom.xml b/tajo-storage/tajo-storage-jdbc/pom.xml index 3c3bee3..f225c72 100644 --- a/tajo-storage/tajo-storage-jdbc/pom.xml +++ b/tajo-storage/tajo-storage-jdbc/pom.xml @@ -52,11 +52,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.7</source> - <target>1.7</target> - <encoding>${project.build.sourceEncoding}</encoding> - </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId> http://git-wip-us.apache.org/repos/asf/tajo/blob/513aff42/tajo-thirdparty/asm/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-thirdparty/asm/pom.xml b/tajo-thirdparty/asm/pom.xml index 0b07bf7..6981edb 100644 --- a/tajo-thirdparty/asm/pom.xml +++ b/tajo-thirdparty/asm/pom.xml @@ -46,6 +46,10 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.7</source> + <target>1.7</target> + </configuration> </plugin> <plugin> <groupId>org.apache.rat</groupId>
