You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2017/02/09 22:13:24 UTC
[08/10] accumulo git commit: Merge branch '1.7' into 1.8
Merge branch '1.7' into 1.8
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e86fabb8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e86fabb8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e86fabb8
Branch: refs/heads/master
Commit: e86fabb87730abce15ca8f66459cdd44372aeadf
Parents: a4ef3e0 a9bf10f
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Feb 9 16:45:46 2017 -0500
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Feb 9 16:45:46 2017 -0500
----------------------------------------------------------------------
proxy/src/main/cpp/proxy_types.cpp | 14 +++++++++++---
proxy/src/main/cpp/proxy_types.h | 6 +++++-
.../accumulo/proxy/thrift/SystemPermission.java | 14 +++++++++++++-
proxy/src/main/python/ttypes.py | 12 ++++++++++++
proxy/src/main/ruby/proxy_types.rb | 8 ++++++--
proxy/src/main/thrift/proxy.thrift | 4 ++++
6 files changed, 51 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e86fabb8/proxy/src/main/cpp/proxy_types.cpp
----------------------------------------------------------------------
diff --cc proxy/src/main/cpp/proxy_types.cpp
index 09c2d9c,4a626f5..87ef7ac
--- a/proxy/src/main/cpp/proxy_types.cpp
+++ b/proxy/src/main/cpp/proxy_types.cpp
@@@ -83,34 -84,14 +87,38 @@@ const char* _kSystemPermissionNames[]
"CREATE_USER",
"DROP_USER",
"ALTER_USER",
- "SYSTEM"
+ "SYSTEM",
+ "CREATE_NAMESPACE",
+ "DROP_NAMESPACE",
+ "ALTER_NAMESPACE",
+ "OBTAIN_DELEGATION_TOKEN"
};
- const std::map<int, const char*> _SystemPermission_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kSystemPermissionValues, _kSystemPermissionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+ const std::map<int, const char*> _SystemPermission_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(12, _kSystemPermissionValues, _kSystemPermissionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+int _kNamespacePermissionValues[] = {
+ NamespacePermission::READ,
+ NamespacePermission::WRITE,
+ NamespacePermission::ALTER_NAMESPACE,
+ NamespacePermission::GRANT,
+ NamespacePermission::ALTER_TABLE,
+ NamespacePermission::CREATE_TABLE,
+ NamespacePermission::DROP_TABLE,
+ NamespacePermission::BULK_IMPORT,
+ NamespacePermission::DROP_NAMESPACE
+};
+const char* _kNamespacePermissionNames[] = {
+ "READ",
+ "WRITE",
+ "ALTER_NAMESPACE",
+ "GRANT",
+ "ALTER_TABLE",
+ "CREATE_TABLE",
+ "DROP_TABLE",
+ "BULK_IMPORT",
+ "DROP_NAMESPACE"
+};
+const std::map<int, const char*> _NamespacePermission_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(9, _kNamespacePermissionValues, _kNamespacePermissionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
int _kScanTypeValues[] = {
ScanType::SINGLE,
ScanType::BATCH
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e86fabb8/proxy/src/main/cpp/proxy_types.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e86fabb8/proxy/src/main/java/org/apache/accumulo/proxy/thrift/SystemPermission.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e86fabb8/proxy/src/main/python/ttypes.py
----------------------------------------------------------------------
diff --cc proxy/src/main/python/ttypes.py
index 87a977d,a748c0a..3f9ec9c
--- a/proxy/src/main/python/ttypes.py
+++ b/proxy/src/main/python/ttypes.py
@@@ -112,43 -120,12 +120,47 @@@ class SystemPermission
"DROP_USER": 5,
"ALTER_USER": 6,
"SYSTEM": 7,
+ "CREATE_NAMESPACE": 8,
+ "DROP_NAMESPACE": 9,
+ "ALTER_NAMESPACE": 10,
+ "OBTAIN_DELEGATION_TOKEN": 11,
}
+class NamespacePermission:
+ READ = 0
+ WRITE = 1
+ ALTER_NAMESPACE = 2
+ GRANT = 3
+ ALTER_TABLE = 4
+ CREATE_TABLE = 5
+ DROP_TABLE = 6
+ BULK_IMPORT = 7
+ DROP_NAMESPACE = 8
+
+ _VALUES_TO_NAMES = {
+ 0: "READ",
+ 1: "WRITE",
+ 2: "ALTER_NAMESPACE",
+ 3: "GRANT",
+ 4: "ALTER_TABLE",
+ 5: "CREATE_TABLE",
+ 6: "DROP_TABLE",
+ 7: "BULK_IMPORT",
+ 8: "DROP_NAMESPACE",
+ }
+
+ _NAMES_TO_VALUES = {
+ "READ": 0,
+ "WRITE": 1,
+ "ALTER_NAMESPACE": 2,
+ "GRANT": 3,
+ "ALTER_TABLE": 4,
+ "CREATE_TABLE": 5,
+ "DROP_TABLE": 6,
+ "BULK_IMPORT": 7,
+ "DROP_NAMESPACE": 8,
+ }
+
class ScanType:
SINGLE = 0
BATCH = 1
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e86fabb8/proxy/src/main/ruby/proxy_types.rb
----------------------------------------------------------------------
diff --cc proxy/src/main/ruby/proxy_types.rb
index e542df6,522c80c..ddf8a18
--- a/proxy/src/main/ruby/proxy_types.rb
+++ b/proxy/src/main/ruby/proxy_types.rb
@@@ -52,24 -52,14 +52,28 @@@ module Accumul
DROP_USER = 5
ALTER_USER = 6
SYSTEM = 7
- VALUE_MAP = {0 => "GRANT", 1 => "CREATE_TABLE", 2 => "DROP_TABLE", 3 => "ALTER_TABLE", 4 => "CREATE_USER", 5 => "DROP_USER", 6 => "ALTER_USER", 7 => "SYSTEM"}
- VALID_VALUES = Set.new([GRANT, CREATE_TABLE, DROP_TABLE, ALTER_TABLE, CREATE_USER, DROP_USER, ALTER_USER, SYSTEM]).freeze
+ CREATE_NAMESPACE = 8
+ DROP_NAMESPACE = 9
+ ALTER_NAMESPACE = 10
+ OBTAIN_DELEGATION_TOKEN = 11
+ VALUE_MAP = {0 => "GRANT", 1 => "CREATE_TABLE", 2 => "DROP_TABLE", 3 => "ALTER_TABLE", 4 => "CREATE_USER", 5 => "DROP_USER", 6 => "ALTER_USER", 7 => "SYSTEM", 8 => "CREATE_NAMESPACE", 9 => "DROP_NAMESPACE", 10 => "ALTER_NAMESPACE", 11 => "OBTAIN_DELEGATION_TOKEN"}
+ VALID_VALUES = Set.new([GRANT, CREATE_TABLE, DROP_TABLE, ALTER_TABLE, CREATE_USER, DROP_USER, ALTER_USER, SYSTEM, CREATE_NAMESPACE, DROP_NAMESPACE, ALTER_NAMESPACE, OBTAIN_DELEGATION_TOKEN]).freeze
end
+ module NamespacePermission
+ READ = 0
+ WRITE = 1
+ ALTER_NAMESPACE = 2
+ GRANT = 3
+ ALTER_TABLE = 4
+ CREATE_TABLE = 5
+ DROP_TABLE = 6
+ BULK_IMPORT = 7
+ DROP_NAMESPACE = 8
+ VALUE_MAP = {0 => "READ", 1 => "WRITE", 2 => "ALTER_NAMESPACE", 3 => "GRANT", 4 => "ALTER_TABLE", 5 => "CREATE_TABLE", 6 => "DROP_TABLE", 7 => "BULK_IMPORT", 8 => "DROP_NAMESPACE"}
+ VALID_VALUES = Set.new([READ, WRITE, ALTER_NAMESPACE, GRANT, ALTER_TABLE, CREATE_TABLE, DROP_TABLE, BULK_IMPORT, DROP_NAMESPACE]).freeze
+ end
+
module ScanType
SINGLE = 0
BATCH = 1
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e86fabb8/proxy/src/main/thrift/proxy.thrift
----------------------------------------------------------------------
diff --cc proxy/src/main/thrift/proxy.thrift
index 3814c44,00427c0..e15990c
--- a/proxy/src/main/thrift/proxy.thrift
+++ b/proxy/src/main/thrift/proxy.thrift
@@@ -131,20 -131,12 +131,24 @@@ enum SystemPermission
DROP_USER = 5,
ALTER_USER = 6,
SYSTEM = 7,
+ CREATE_NAMESPACE = 8,
+ DROP_NAMESPACE = 9,
+ ALTER_NAMESPACE = 10,
+ OBTAIN_DELEGATION_TOKEN = 11,
}
+enum NamespacePermission {
+ READ = 0,
+ WRITE = 1,
+ ALTER_NAMESPACE = 2,
+ GRANT = 3,
+ ALTER_TABLE = 4,
+ CREATE_TABLE = 5,
+ DROP_TABLE = 6,
+ BULK_IMPORT = 7,
+ DROP_NAMESPACE = 8
+}
+
enum ScanType {
SINGLE,
BATCH