From 84a5ac3c7b50de41fa31c1c0f16cf54d95e7949a Mon Sep 17 00:00:00 2001 From: Josh Elser Date: Wed, 3 Oct 2018 17:43:05 -0400 Subject: [PATCH] PHOENIX-4946 Switch from HC's annotations (since removed) to JCIP annotations Avoids an old httpclient artifact conflicting with Hadoop3 implementation. Signed-off-by: Sergey Soldatov --- phoenix-core/pom.xml | 6 ------ .../src/main/java/org/apache/phoenix/cache/HashCache.java | 3 ++- .../java/org/apache/phoenix/compile/GroupByCompiler.java | 3 ++- .../java/org/apache/phoenix/memory/ChildMemoryManager.java | 5 +++-- .../java/org/apache/phoenix/memory/GlobalMemoryManager.java | 4 +++- .../java/org/apache/phoenix/parse/FunctionParseNode.java | 3 ++- .../main/java/org/apache/phoenix/query/QueryServices.java | 3 ++- .../src/main/java/org/apache/phoenix/schema/ColumnRef.java | 3 ++- .../main/java/org/apache/phoenix/schema/KeyValueSchema.java | 3 ++- .../src/main/java/org/apache/phoenix/schema/PNameImpl.java | 5 +++-- 10 files changed, 21 insertions(+), 17 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 80e4a8997a2..f9718ea2f12 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -283,12 +283,6 @@ protobuf-java ${protobuf-java.version} - - - org.apache.httpcomponents - httpclient - 4.0.1 - log4j log4j diff --git a/phoenix-core/src/main/java/org/apache/phoenix/cache/HashCache.java b/phoenix-core/src/main/java/org/apache/phoenix/cache/HashCache.java index 764fd170113..80e37ce64db 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/cache/HashCache.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/cache/HashCache.java @@ -21,7 +21,8 @@ import java.io.IOException; import java.util.List; -import org.apache.http.annotation.Immutable; +import net.jcip.annotations.Immutable; + import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr; import org.apache.phoenix.schema.tuple.Tuple; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java index 0a9e1bc4127..4777c296ceb 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java @@ -23,8 +23,9 @@ import java.util.Comparator; import java.util.List; +import net.jcip.annotations.Immutable; + import org.apache.hadoop.hbase.util.Pair; -import org.apache.http.annotation.Immutable; import org.apache.phoenix.compile.OrderPreservingTracker.Ordering; import org.apache.phoenix.coprocessor.BaseScannerRegionObserver; import org.apache.phoenix.exception.SQLExceptionCode; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/memory/ChildMemoryManager.java b/phoenix-core/src/main/java/org/apache/phoenix/memory/ChildMemoryManager.java index da009fb57c7..f5ad5ddb0a2 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/memory/ChildMemoryManager.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/memory/ChildMemoryManager.java @@ -17,8 +17,9 @@ */ package org.apache.phoenix.memory; -import org.apache.http.annotation.GuardedBy; -import org.apache.http.annotation.ThreadSafe; +import net.jcip.annotations.GuardedBy; +import net.jcip.annotations.ThreadSafe; + import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.exception.SQLExceptionInfo; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java index fe0d6d746c9..f55708990f5 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java @@ -17,11 +17,13 @@ */ package org.apache.phoenix.memory; -import org.apache.http.annotation.GuardedBy; +import net.jcip.annotations.GuardedBy; + import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.exception.SQLExceptionInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + /** * * Global memory manager to track course grained memory usage across all requests. diff --git a/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java b/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java index fc16156eb2f..1236dde5610 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/parse/FunctionParseNode.java @@ -30,7 +30,8 @@ import java.util.List; import java.util.Set; -import org.apache.http.annotation.Immutable; +import net.jcip.annotations.Immutable; + import org.apache.phoenix.compile.ColumnResolver; import org.apache.phoenix.compile.StatementContext; import org.apache.phoenix.expression.Determinism; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java index 73548532198..96f7e1d4cef 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java @@ -19,7 +19,8 @@ import java.util.concurrent.ThreadPoolExecutor; -import org.apache.http.annotation.Immutable; +import net.jcip.annotations.Immutable; + import org.apache.phoenix.iterate.SpoolTooBigToDiskException; import org.apache.phoenix.memory.MemoryManager; import org.apache.phoenix.optimize.QueryOptimizer; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/ColumnRef.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/ColumnRef.java index fa3156db3b1..c7fdbf6a20a 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schema/ColumnRef.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/ColumnRef.java @@ -21,8 +21,9 @@ import java.sql.SQLException; import java.util.Arrays; +import net.jcip.annotations.Immutable; + import org.apache.hadoop.hbase.io.ImmutableBytesWritable; -import org.apache.http.annotation.Immutable; import org.apache.phoenix.compile.ExpressionCompiler; import org.apache.phoenix.compile.StatementContext; import org.apache.phoenix.expression.Expression; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/KeyValueSchema.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/KeyValueSchema.java index 1ab8c865f55..10906916f57 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schema/KeyValueSchema.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/KeyValueSchema.java @@ -19,9 +19,10 @@ import java.util.List; +import net.jcip.annotations.Immutable; + import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.io.WritableUtils; -import org.apache.http.annotation.Immutable; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.exception.SQLExceptionInfo; import org.apache.phoenix.expression.Expression; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/PNameImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/PNameImpl.java index 3f19a6e6c41..dd1f6eca986 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schema/PNameImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/PNameImpl.java @@ -17,8 +17,9 @@ */ package org.apache.phoenix.schema; +import net.jcip.annotations.Immutable; + import org.apache.hadoop.hbase.util.Bytes; -import org.apache.http.annotation.Immutable; import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr; import org.apache.phoenix.util.SizedUtil; @@ -106,4 +107,4 @@ public boolean equals(Object obj) { public String toString() { return data.stringName; } -} \ No newline at end of file +}