phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/4] phoenix git commit: PHOENIX-4088 Clean up SQLExceptionCode (Csaba Skrabak)
Date Thu, 17 Aug 2017 19:21:45 GMT
PHOENIX-4088 Clean up SQLExceptionCode (Csaba Skrabak)


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

Branch: refs/heads/4.x-HBase-1.2
Commit: e839778fe84934242e2cc55cf3efe9d2ec8a3a3d
Parents: 3d991b7
Author: Josh Elser <elserj@apache.org>
Authored: Thu Aug 17 12:52:29 2017 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Aug 17 14:49:48 2017 -0400

----------------------------------------------------------------------
 .../apache/phoenix/exception/SQLExceptionCode.java  | 16 +++++++++-------
 .../phoenix/query/ConnectionQueryServicesImpl.java  | 10 ++--------
 2 files changed, 11 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e839778f/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
index de45000..4744f69 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
@@ -421,17 +421,19 @@ public enum SQLExceptionCode {
         public SQLException newException(SQLExceptionInfo info) {
             return new SchemaAlreadyExistsException(info.getSchemaName());
         }
-    }), SCHEMA_NOT_FOUND(722, "43M05", "Schema does not exists", new Factory() {
+    }),
+    SCHEMA_NOT_FOUND(722, "43M05", "Schema does not exist", new Factory() {
         @Override
         public SQLException newException(SQLExceptionInfo info) {
             return new SchemaNotFoundException(info.getSchemaName());
         }
-    }), CANNOT_MUTATE_SCHEMA(723, "43M06", "Cannot mutate schema as schema has existing tables"),
SCHEMA_NOT_ALLOWED(
-            724, "43M07", "Schema name not allowed!!"), CREATE_SCHEMA_NOT_ALLOWED(725, "43M08",
-                    "Cannot create schema because config " + QueryServices.IS_NAMESPACE_MAPPING_ENABLED
-                            + " for enabling name space mapping isn't enabled."), INCONSISTENET_NAMESPACE_MAPPING_PROPERTIES(
-                                    726, "43M10", " Inconsistent namespace mapping properites.."),
ASYNC_NOT_ALLOWED(
-                                    727, "43M11", " ASYNC option is not allowed.. "),
+    }),
+    CANNOT_MUTATE_SCHEMA(723, "43M06", "Cannot mutate schema as schema has existing tables"),
+    SCHEMA_NOT_ALLOWED(724, "43M07", "Schema name not allowed!!"),
+    CREATE_SCHEMA_NOT_ALLOWED(725, "43M08", "Cannot create schema because config "
+            + QueryServices.IS_NAMESPACE_MAPPING_ENABLED + " for enabling name space mapping
isn't enabled."),
+    INCONSISTENT_NAMESPACE_MAPPING_PROPERTIES(726, "43M10", " Inconsistent namespace mapping
properties.."),
+    ASYNC_NOT_ALLOWED(727, "43M11", " ASYNC option is not allowed.. "),
     NEW_CONNECTION_THROTTLED(728, "410M1", "Could not create connection " +
         "because this client already has the maximum number" +
         " of connections to the target cluster."),

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e839778f/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 1789318..83c4b1d 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -238,11 +238,7 @@ import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.ServerUtil;
 import org.apache.phoenix.util.UpgradeUtil;
-import org.apache.twill.discovery.ZKDiscoveryService;
-import org.apache.twill.zookeeper.RetryStrategies;
 import org.apache.twill.zookeeper.ZKClientService;
-import org.apache.twill.zookeeper.ZKClientServices;
-import org.apache.twill.zookeeper.ZKClients;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -250,14 +246,12 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Throwables;
-import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
 
 public class ConnectionQueryServicesImpl extends DelegateQueryServices implements ConnectionQueryServices
{
     private static final Logger logger = LoggerFactory.getLogger(ConnectionQueryServicesImpl.class);
@@ -1226,7 +1220,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
             }
             if (isTableNamespaceMappingEnabled != SchemaUtil.isNamespaceMappingEnabled(PTableType.TABLE,
                     getProps())) { throw new SQLExceptionInfo.Builder(
-                            SQLExceptionCode.INCONSISTENET_NAMESPACE_MAPPING_PROPERTIES)
+                            SQLExceptionCode.INCONSISTENT_NAMESPACE_MAPPING_PROPERTIES)
                     .setMessage(
                             "Ensure that config " + QueryServices.IS_NAMESPACE_MAPPING_ENABLED
                             + " is consitent on client and server.")
@@ -2400,7 +2394,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
                                     }
                                     ensureSystemTablesUpgraded(ConnectionQueryServicesImpl.this.getProps());
                                 } else if (mappedSystemCatalogExists) { throw new SQLExceptionInfo.Builder(
-                                        SQLExceptionCode.INCONSISTENET_NAMESPACE_MAPPING_PROPERTIES)
+                                        SQLExceptionCode.INCONSISTENT_NAMESPACE_MAPPING_PROPERTIES)
                                 .setMessage("Cannot initiate connection as "
                                         + SchemaUtil.getPhysicalTableName(
                                                 SYSTEM_CATALOG_NAME_BYTES, true)


Mime
View raw message