gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [2/4] gora git commit: Switched Accumulo Dependency to 1.7.1 and ported AccumuloStore Class to work with 1.7.1
Date Wed, 22 Feb 2017 16:19:22 GMT
Switched Accumulo Dependency to 1.7.1 and ported AccumuloStore Class to
work with 1.7.1 

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

Branch: refs/heads/master
Commit: 1d38afc472ba0fd0f67bdb555d1a790aa55ae60e
Parents: 560704c
Author: Vaibhav Thapliyal <vaibhav.thapliyal.91@gmail.com>
Authored: Sat Feb 18 13:26:17 2017 +0530
Committer: Vaibhav Thapliyal <vaibhav.thapliyal.91@gmail.com>
Committed: Sat Feb 18 13:26:17 2017 +0530

----------------------------------------------------------------------
 gora-accumulo/pom.xml                                   |  2 +-
 .../org/apache/gora/accumulo/store/AccumuloStore.java   | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/1d38afc4/gora-accumulo/pom.xml
----------------------------------------------------------------------
diff --git a/gora-accumulo/pom.xml b/gora-accumulo/pom.xml
index bc131fa..e13f7a7 100644
--- a/gora-accumulo/pom.xml
+++ b/gora-accumulo/pom.xml
@@ -50,7 +50,7 @@
   </ciManagement>
 
   <properties>
-    <accumulo.version>1.6.4</accumulo.version>
+    <accumulo.version>1.7.1</accumulo.version>
     <osgi.import>*</osgi.import>
     <osgi.export>org.apache.gora.accumulo*;version="${project.version}";-noimport:=true</osgi.export>
   </properties>

http://git-wip-us.apache.org/repos/asf/gora/blob/1d38afc4/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
----------------------------------------------------------------------
diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
index a68cdaa..c0cd026 100644
--- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
+++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
@@ -54,12 +54,13 @@ import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.TabletLocator;
 import org.apache.accumulo.core.client.mock.MockConnector;
 import org.apache.accumulo.core.client.mock.MockInstance;
-import org.apache.accumulo.core.client.mock.MockTabletLocator;
+import org.apache.accumulo.core.client.mock.impl.MockTabletLocator;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.data.Key;
-import org.apache.accumulo.core.data.KeyExtent;
+import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
@@ -68,7 +69,8 @@ import org.apache.accumulo.core.iterators.user.TimestampFilter;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
-import org.apache.accumulo.core.security.Credentials;
+import org.apache.accumulo.core.client.impl.ClientContext;
+import org.apache.accumulo.core.client.impl.Credentials;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.avro.Schema;
@@ -895,12 +897,12 @@ public class AccumuloStore<K,T extends PersistentBase> extends
DataStoreBase<K,T
       if (conn instanceof MockConnector)
         tl = new MockTabletLocator();
       else
-        tl = TabletLocator.getLocator(conn.getInstance(), new Text(Tables.getTableId(conn.getInstance(),
mapping.tableName)));
+        tl = TabletLocator.getLocator(new ClientContext(conn.getInstance(), credentials,
AccumuloConfiguration.getTableConfiguration(conn, Tables.getTableId(conn.getInstance(), mapping.tableName))),
new Text(Tables.getTableId(conn.getInstance(), mapping.tableName)));
 
       Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<>();
 
       tl.invalidateCache();
-      while (tl.binRanges(credentials, Collections.singletonList(createRange(query)), binnedRanges).size()
> 0) {
+      while (tl.binRanges(new ClientContext(conn.getInstance(), credentials, AccumuloConfiguration.getTableConfiguration(conn,
Tables.getTableId(conn.getInstance(), mapping.tableName))), Collections.singletonList(createRange(query)),
binnedRanges).size() > 0) {
         // TODO log?
         if (!Tables.exists(conn.getInstance(), Tables.getTableId(conn.getInstance(), mapping.tableName)))
           throw new TableDeletedException(Tables.getTableId(conn.getInstance(), mapping.tableName));


Mime
View raw message