hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wellington Chevreuil <wellington.chevre...@gmail.com>
Subject Re: how do disable encryption on a CF
Date Thu, 24 Jan 2019 02:00:24 GMT
I believe this is a limitation from hbase shell, where it provides no means
to set a null value for a column family property. An alternative would be
to use Java Client API, below a code example:

    Configuration configuration =  HBaseConfiguration.create();

    try(Connection connection =
ConnectionFactory.createConnection(configuration)){
      Admin admin = connection.getAdmin();
      ColumnFamilyDescriptorBuilder descriptorBuilder =
ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(args[1]));
      descriptorBuilder.setEncryptionType(null);
      admin.modifyColumnFamily(TableName.valueOf(args[0]),
descriptorBuilder.build());
    } finally {

    }

If you really want/need to have this functionality working from shell, then
an alternative would be to create your own Master coprocessor, where
in preModifyTable method you would check the ColumnFamilyDescriptor value
for ENCRYPTION property, replacing 'NONE' or '' values by null.

Em qua, 23 de jan de 2019 às 16:04, marjana <mivkovic@us.ibm.com> escreveu:

> Hello,
>
> I setup hbase encryption and enabled it on a subset of tables.
> I am looking for a way to revert back to non encrypted tables without
> having
> to recreate a new set of tables and copy data from encrypted to
> nonencrypted.
>
> I have tried in hbase shell a few ways but can't get it to work:
>
> alter 't1',{NAME => 'e', ENCRYPTION => ''}
>
> ERROR: java.io.IOException: Cipher  previously failed test
>         at
>
> org.apache.hadoop.hbase.util.EncryptionTest.testEncryption(EncryptionTest.java:155)
>
>
> alter 't1',{NAME => 'e', ENCRYPTION => 'NONE'}
>
> ERROR: java.io.IOException: Cipher NONE previously failed test
>         at
>
> org.apache.hadoop.hbase.util.EncryptionTest.testEncryption(EncryptionTest.java:155)
>
>
>
> Is there a way to make this work?
> Thanks!
>
>
>
>
>
> --
> Sent from:
> http://apache-hbase.679495.n3.nabble.com/HBase-User-f4020416.html
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message