accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1437167 [3/3] - in /accumulo/trunk/proxy/src: main/java/org/apache/accumulo/proxy/ main/java/org/apache/accumulo/proxy/thrift/ main/thrift/ test/java/org/apache/accumulo/
Date Tue, 22 Jan 2013 21:03:06 GMT
Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PTimeType.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PTimeType.java?rev=1437167&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PTimeType.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PTimeType.java Tue
Jan 22 21:03:05 2013
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.proxy.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum PTimeType implements org.apache.thrift.TEnum {
+  LOGICAL(0),
+  MILLIS(1);
+
+  private final int value;
+
+  private PTimeType(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static PTimeType findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return LOGICAL;
+      case 1:
+        return MILLIS;
+      default:
+        return null;
+    }
+  }
+}

Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PTimeType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: accumulo/trunk/proxy/src/main/thrift/proxy.thrift
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/thrift/proxy.thrift?rev=1437167&r1=1437166&r2=1437167&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/thrift/proxy.thrift (original)
+++ accumulo/trunk/proxy/src/main/thrift/proxy.thrift Tue Jan 22 21:03:05 2013
@@ -168,6 +168,11 @@ enum PIteratorScope {
   SCAN
 }
 
+enum PTimeType {
+  LOGICAL,
+  MILLIS
+}
+
 exception NoMoreEntriesException
 {
   1:string msg;
@@ -200,34 +205,45 @@ service AccumuloProxy
 {
   bool ping (1:UserPass userpass);
 
-  //table operations
-
+  // table operations
   i32 tableOperations_addConstraint (1:UserPass userpass, 2:string tableName, 3:string constraintClassName)
throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException
ouch3);
   void tableOperations_addSplits (1:UserPass userpass, 2:string tableName, 3:set<binary>
splits) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException
ouch3);
+  void tableOperations_attachIterator (1:UserPass userpass, 2:string tableName, 3:PIteratorSetting
setting, 4:set<PIteratorScope> scopes) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException
ouch2, 3:TableNotFoundException ouch3);
+  void tableOperations_checkIteratorConflicts (1:UserPass userpass, 2:string tableName, 3:PIteratorSetting
setting, 4:set<PIteratorScope> scopes) throws (1:AccumuloException ouch1, 2:TableNotFoundException
ouch2);
   void tableOperations_clearLocatorCache (1:UserPass userpass, 2:string tableName) throws
(1:TableNotFoundException ouch1);
-  void tableOperations_compact (1:UserPass userpass, 2:string tableName, 3:binary startRow,
4:binary endRow, 5:bool flush, 6:bool wait) throws (1:AccumuloSecurityException ouch1, 2:TableNotFoundException
ouch2, 3:AccumuloException ouch3);
-  void tableOperations_create (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException
ouch1, 2:AccumuloSecurityException ouch2, 3:TableExistsException ouch3);
+  void tableOperations_clone (1:UserPass userpass, 2:string tableName, 3:string newTableName,
4:bool flush, 5:map<string,string> propertiesToSet, 6:set<string> propertiesToExclude)
throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException
ouch3, 4:TableExistsException ouch4);
+  void tableOperations_compact (1:UserPass userpass, 2:string tableName, 3:binary startRow,
4:binary endRow, 5:list<PIteratorSetting> iterators, 6:bool flush, 7:bool wait) throws
(1:AccumuloSecurityException ouch1, 2:TableNotFoundException ouch2, 3:AccumuloException ouch3);
+  void tableOperations_create (1:UserPass userpass, 2:string tableName, 3:bool versioningIter,
4:PTimeType type) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableExistsException
ouch3);
   void tableOperations_delete (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException
ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void tableOperations_deleteRows (1:UserPass userpass, 2:string tableName, 3:binary startRow,
4:binary endRow) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException
ouch3);
   bool tableOperations_exists (1:UserPass userpass, 2:string tableName);
+  void tableOperations_exportTable (1:UserPass userpass, 2:string tableName, 3:string exportDir)
throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException
ouch3);
   void tableOperations_flush (1:UserPass userpass, 2:string tableName, 3:binary startRow,
4:binary endRow, 5:bool wait) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException
ouch2);
   map<string,set<string>> tableOperations_getLocalityGroups (1:UserPass userpass,
2:string tableName) throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
+  PIteratorSetting tableOperations_getIteratorSetting (1:UserPass userpass, 2:string tableName,
3:string iteratorName, 4:PIteratorScope scope) throws (1:AccumuloSecurityException ouch1,
2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
   binary tableOperations_getMaxRow (1:UserPass userpass, 2:string tableName, 3:list<binary>
auths, 4:binary startRow, 5:bool startInclusive, 6:binary endRow, 7:bool endInclusive) throws
(1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
   map<string,string> tableOperations_getProperties (1:UserPass userpass, 2:string tableName)
throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
   list<binary> tableOperations_getSplits (1:UserPass userpass, 2:string tableName,
3:i32 maxSplits) throws (1:TableNotFoundException ouch1);
+  void tableOperations_importDirectory (1:UserPass userpass, 2:string tableName, 3:string
importDir, 4:string failureDir, 5:bool setTime) throws (1:TableNotFoundException ouch1, 2:AccumuloException
ouch3, 3:AccumuloSecurityException ouch4);
+  void tableOperations_importTable (1:UserPass userpass, 2:string tableName, 3:string importDir)
throws (1:TableExistsException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException
ouch3);
   set<string> tableOperations_list (1:UserPass userpass);
+  map<string,set<PIteratorScope>> tableOperations_listIterators (1:UserPass userpass,
2:string tableName) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2,
3:TableNotFoundException ouch3);
   map<string,i32> tableOperations_listConstraints (1:UserPass userpass, 2:string tableName)
throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
   void tableOperations_merge (1:UserPass userpass, 2:string tableName, 3:binary startRow,
4:binary endRow) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException
ouch3);
   void tableOperations_offline (1:UserPass userpass, 2:string tableName) throws (1:AccumuloSecurityException
ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
   void tableOperations_online (1:UserPass userpass, 2:string tableName) throws (1:AccumuloSecurityException
ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
   void tableOperations_removeConstraint (1:UserPass userpass, 2:string tableName, 3:i32 constraint)
throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  void tableOperations_removeIterator (1:UserPass userpass, 2:string tableName, 3:string
iterName, 4:set<PIteratorScope> scopes) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException
ouch2, 3:TableNotFoundException ouch3);
   void tableOperations_removeProperty (1:UserPass userpass, 2:string tableName, 3:string
property) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   void tableOperations_rename (1:UserPass userpass, 2:string oldTableName, 3:string newTableName)
throws (1:AccumuloSecurityException ouch1, 2:TableNotFoundException ouch2, 3:AccumuloException
ouch3, 4:TableExistsException ouch4);
   void tableOperations_setLocalityGroups (1:UserPass userpass, 2:string tableName, 3:map<string,set<string>>
groups) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException
ouch3);
   void tableOperations_setProperty (1:UserPass userpass, 2:string tableName, 3:string property,
4:string value) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  set<PRange> tableOperations_splitRangeByTablets (1:UserPass userpass, 2:string tableName,
3:PRange range, 4:i32 maxSplits) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException
ouch2, 3:TableNotFoundException ouch3);
   map<string,string> tableOperations_tableIdMap (1:UserPass userpass);
 
-  //instance operations
+
+  // instance operations
+  void instanceOperations_pingTabletServer(1:UserPass userpass, 2:string tserver) throws
(1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   list<PActiveScan> instanceOperations_getActiveScans (1:UserPass userpass, 2:string
tserver) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   list<PActiveCompaction> instanceOperations_getActiveCompactions(1:UserPass userpass,
2:string tserver) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   map<string,string> instanceOperations_getSiteConfiguration (1:UserPass userpass)
throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
@@ -238,11 +254,11 @@ service AccumuloProxy
   bool instanceOperations_testClassLoad (1:UserPass userpass, 2:string className, 3:string
asTypeName) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
 
 
-  //security operations
+  // security operations
   bool securityOperations_authenticateUser (1:UserPass userpass, 2:string user, 3:binary
password) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   void securityOperations_changeUserAuthorizations (1:UserPass userpass, 2:string user, 3:set<string>
authorizations) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   void securityOperations_changeUserPassword (1:UserPass userpass, 2:string user, 3:binary
password) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
-  void securityOperations_createUser (1:UserPass userpass, 2:string user, 3:binary password,
4:set<string> authorizations) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException
ouch2);
+  void securityOperations_createUser (1:UserPass userpass, 2:string user, 3:binary password)
throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   void securityOperations_dropUser (1:UserPass userpass, 2:string user) throws (1:AccumuloException
ouch1, 2:AccumuloSecurityException ouch2);
   list<binary> securityOperations_getUserAuthorizations (1:UserPass userpass, 2:string
user) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   void securityOperations_grantSystemPermission (1:UserPass userpass, 2:string user, 3:PSystemPermission
perm) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
@@ -254,7 +270,7 @@ service AccumuloProxy
   void securityOperations_revokeTablePermission (1:UserPass userpass, 2:string user, 3:string
table, 4:PTablePermission perm) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException
ouch2);
 
 
-  //scanning
+  // scanning
 
   string createBatchScanner(1:UserPass userpass, 2:string tableName, 3:set<string>
authorizations, 4:PIteratorSetting iteratorSetting, 5:list<PRange> range);
   string createScanner(1:UserPass userpass, 2:string tableName, 3:set<string> authorizations,
4:PIteratorSetting iteratorSetting, 5:PRange range);
@@ -264,29 +280,15 @@ service AccumuloProxy
   PScanResult scanner_next_k(1:string scanner, 2:i32 k);
   void close_scanner(1:string scanner);
 
-  //writing
+  // writing
 
   void updateAndFlush(1:UserPass userpass, 2:string tableName, 3:map<binary, list<PColumnUpdate>>
cells);
 
   string createWriter(1:UserPass userpass, 2:string tableName);
-
   oneway void writer_update(1:string writer, 2:map<binary, list<PColumnUpdate>>
cells);
-
   void writer_flush(1:string writer)
-
   void writer_close(1:string writer)
 
-  void tableOperations_attachIterator (1:UserPass userpass, 2:string tableName, 3:PIteratorSetting
setting, 4:set<PIteratorScope> scopes) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException
ouch2, 3:TableNotFoundException ouch3);
-  void tableOperations_checkIteratorConflicts (1:UserPass userpass, 2:string tableName, 3:PIteratorSetting
setting, 4:set<PIteratorScope> scopes) throws (1:AccumuloException ouch1, 2:TableNotFoundException
ouch2);
-  void tableOperations_clone (1:UserPass userpass, 2:string tableName, 3:string newTableName,
4:bool flush, 5:map<string,string> propertiesToSet, 6:set<string> propertiesToExclude)
throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException
ouch3, 4:TableExistsException ouch4);
-  void tableOperations_exportTable (1:UserPass userpass, 2:string tableName, 3:string exportDir)
throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException
ouch3);
-  void tableOperations_importTable (1:UserPass userpass, 2:string tableName, 3:string importDir)
throws (1:TableExistsException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException
ouch3);
-  PIteratorSetting tableOperations_getIteratorSetting (1:UserPass userpass, 2:string tableName,
3:string iteratorName, 4:PIteratorScope scope) throws (1:AccumuloSecurityException ouch1,
2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
-  map<string,set<PIteratorScope>> tableOperations_listIterators (1:UserPass userpass,
2:string tableName) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2,
3:TableNotFoundException ouch3);
-  void tableOperations_removeIterator (1:UserPass userpass, 2:string tableName, 3:string
iterName, 4:set<PIteratorScope> scopes) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException
ouch2, 3:TableNotFoundException ouch3);
-  set<PRange> tableOperations_splitRangeByTablets (1:UserPass userpass, 2:string tableName,
3:PRange range, 4:i32 maxSplits) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException
ouch2, 3:TableNotFoundException ouch3);
-  void tableOperations_importDirectory (1:UserPass userpass, 2:string tableName, 3:string
importDir, 4:string failureDir, 5:bool setTime) throws (1:TableNotFoundException ouch1, 2:AccumuloException
ouch3, 3:AccumuloSecurityException ouch4);
-
   // utilities
   PRange getRowRange(1:binary row);
   PKey getFollowing(1:PKey key, 2:PPartialKey part);

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java?rev=1437167&r1=1437166&r2=1437167&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java Tue Jan
22 21:03:05 2013
@@ -39,6 +39,7 @@ import org.apache.accumulo.proxy.thrift.
 import org.apache.accumulo.proxy.thrift.PKeyValue;
 import org.apache.accumulo.proxy.thrift.PRange;
 import org.apache.accumulo.proxy.thrift.PScanResult;
+import org.apache.accumulo.proxy.thrift.PTimeType;
 import org.apache.accumulo.proxy.thrift.UserPass;
 import org.apache.thrift.server.TServer;
 import org.junit.After;
@@ -81,7 +82,7 @@ public class TestProxyReadWrite {
   
   @Before
   public void makeTestTable() throws Exception {
-    tpc.proxy().tableOperations_create(userpass, testtable);
+    tpc.proxy().tableOperations_create(userpass, testtable, true, PTimeType.MILLIS);
   }
   
   @After

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxySecurityOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxySecurityOperations.java?rev=1437167&r1=1437166&r2=1437167&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxySecurityOperations.java
(original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxySecurityOperations.java
Tue Jan 22 21:03:05 2013
@@ -29,6 +29,7 @@ import org.apache.accumulo.proxy.Proxy;
 import org.apache.accumulo.proxy.TestProxyClient;
 import org.apache.accumulo.proxy.thrift.PSystemPermission;
 import org.apache.accumulo.proxy.thrift.PTablePermission;
+import org.apache.accumulo.proxy.thrift.PTimeType;
 import org.apache.accumulo.proxy.thrift.UserPass;
 import org.apache.thrift.TException;
 import org.apache.thrift.server.TServer;
@@ -75,8 +76,8 @@ public class TestProxySecurityOperations
   
   @Before
   public void makeTestTableAndUser() throws Exception {
-    tpc.proxy().tableOperations_create(userpass, testtable);
-    tpc.proxy().securityOperations_createUser(userpass, testuser, testpw, new HashSet<String>());
+    tpc.proxy().tableOperations_create(userpass, testtable, true, PTimeType.MILLIS);
+    tpc.proxy().securityOperations_createUser(userpass, testuser, testpw);
   }
   
   @After
@@ -87,7 +88,7 @@ public class TestProxySecurityOperations
   
   @Test
   public void create() throws TException {
-    tpc.proxy().securityOperations_createUser(userpass, testuser + "2", testpw, new HashSet<String>());
+    tpc.proxy().securityOperations_createUser(userpass, testuser + "2", testpw);
     assertTrue(tpc.proxy().securityOperations_listUsers(userpass).contains(testuser + "2"));
     tpc.proxy().securityOperations_dropUser(userpass, testuser + "2");
     assertTrue(!tpc.proxy().securityOperations_listUsers(userpass).contains(testuser + "2"));

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java?rev=1437167&r1=1437166&r2=1437167&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java Tue
Jan 22 21:03:05 2013
@@ -33,6 +33,7 @@ import java.util.Set;
 import org.apache.accumulo.proxy.Proxy;
 import org.apache.accumulo.proxy.TestProxyClient;
 import org.apache.accumulo.proxy.thrift.PColumnUpdate;
+import org.apache.accumulo.proxy.thrift.PTimeType;
 import org.apache.accumulo.proxy.thrift.UserPass;
 import org.apache.thrift.TException;
 import org.apache.thrift.server.TServer;
@@ -77,7 +78,7 @@ public class TestProxyTableOperations {
   
   @Before
   public void makeTestTable() throws Exception {
-    tpc.proxy().tableOperations_create(userpass, testtable);
+    tpc.proxy().tableOperations_create(userpass, testtable, true, PTimeType.MILLIS);
   }
   
   @After
@@ -93,7 +94,7 @@ public class TestProxyTableOperations {
   @Test
   public void createExistsDelete() throws TException {
     assertFalse(tpc.proxy().tableOperations_exists(userpass, "testtable2"));
-    tpc.proxy().tableOperations_create(userpass, "testtable2");
+    tpc.proxy().tableOperations_create(userpass, "testtable2", true, PTimeType.MILLIS);
     assertTrue(tpc.proxy().tableOperations_exists(userpass, "testtable2"));
     tpc.proxy().tableOperations_delete(userpass, "testtable2");
     assertFalse(tpc.proxy().tableOperations_exists(userpass, "testtable2"));



Mime
View raw message