You can verify your Operational Database powered by Apache Accumulo (OpDB)
installation using the Accumulo shell.
- Install the OpDB CSD file.
- Install CDP and add the HDFS and ZooKeeper services to your deployment.
- Install the OpDB parcel.
- Add the Accumulo on CDP service to your deployment.
-
Launch the Accumulo shell for the admin user.
- Unsecure
OpDB
$ accumulo shell -u root
Password: ******
Shell - Apache Accumulo Interactive Shell
-
- version: [***ACCUMULO VERSION NUMBER***]
- instance name: [***ACCUMULO INSTANCE NAME***]
- instance id: [***ACCUMULO INSTANCE ID***]
-
- type 'help' for a list of available commands
-
root@accumulo>
- Secure
OpDB
kinit -kt /var/run/cloudera-scm-agent/process/[***TIMESTAMP***]-[***SERVICE NAME***]-[***INSTANCE NAME***]/accumulo_on_cdp.keytab accumulo/$[***HOSTNAME***]
accumulo shell
Shell - Apache Accumulo Interactive Shell
-
- version: [***ACCUMULO VERSION NUMBER***]
- instance name: [***ACCUMULO INSTANCE NAME***]
- instance id: [***ACCUMULO INSTANCE ID***]
-
- type 'help' for a list of available commands
-
accumulo/hostname@REALM.COM@accumulo>
-
Run the following commands to verify your installation:
-
Create a table:
createtable test
The test
table is created and becomes the
current table.
-
List the admin user's permission and ensure it has admin and system
level privileges:
userpermission
-
On a secure cluster, the user who creates the table does not get access
to the new table by default. These permissions have to be set
manually:
'grant Table.READ -t test -u accumulo/hostname@REALM.COM'
'grant Table.WRITE -t test -u accumulo/hostname@REALM.COM'
'grant Table.ALTER_TABLE -t test -u accumulo/hostname@REALM.COM'
'grant Table.DROP_TABLE -t test -u accumulo/hostname@REALM.COM'
-
Insert some rows to the
test
table:
insert row f1 q1 v1
insert row f2 q2 v2
insert row f3 q3 v3
-
Scan the table:
scan
row f1:q1 [] v1
row f2:q2 [] v2
row f3:q3 [] v3
-
Delete the
test
table: root@accumulo test>
deletetable
Table: [test] has been deleted.
The following example shows the verification of an
unsecured OpDB
installation:root@accumulo> createtable test
root@accumulo test> userpermissions
System permissions: System.GRANT, System.CREATE_TABLE, System.DROP_TABLE, System.ALTER_TABLE, System.CREATE_USER, System.DROP_USER, System.ALTER_USER, System.SYSTEM, System.CREATE_NAMESPACE, System.DROP_NAMESPACE, System.ALTER_NAMESPACE, System.OBTAIN_DELEGATION_TOKEN
Namespace permissions (accumulo): Namespace.READ, Namespace.ALTER_TABLE
Table permissions (accumulo.metadata): Table.READ, Table.ALTER_TABLE
Table permissions (accumulo.replication): Table.READ
Table permissions (accumulo.root): Table.READ, Table.ALTER_TABLE
Table permissions (test): Table.READ, Table.WRITE, Table.BULK_IMPORT, Table.ALTER_TABLE, Table.GRANT, Table.DROP_TABLE, Table.GET_SUMMARIES
root@accumulo test> insert row f1 q1 v1
root@accumulo test> insert row f2 q2 v2
root@accumulo test> insert row f3 q3 v3
root@accumulo test> scan
row f1:q1 [] v1
row f2:q2 [] v2
row f3:q3 [] v3
root@accumulo test> deletetable
deletetable { test } (yes|no)? yes
Table: [test] has been deleted.
root@accumulo>