accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [2/3] accumulo git commit: Merge branch '1.6' into 1.7
Date Sat, 20 Feb 2016 04:02:18 GMT
Merge branch '1.6' into 1.7


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5093ae34
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5093ae34
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5093ae34

Branch: refs/heads/master
Commit: 5093ae347eb9e37d4fe4d172537f7ee17f777595
Parents: 4678cf9 b033b04
Author: Keith Turner <kturner@apache.org>
Authored: Fri Feb 19 22:44:52 2016 -0500
Committer: Keith Turner <kturner@apache.org>
Committed: Fri Feb 19 22:44:52 2016 -0500

----------------------------------------------------------------------
 .../accumulo/core/file/rfile/bcfile/BCFile.java | 67 +++++++++++++++-----
 1 file changed, 50 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5093ae34/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
index 91d61e1,4767d91..3764603
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
@@@ -26,8 -26,9 +26,10 @@@ import java.io.DataOutputStream
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
++import java.nio.charset.StandardCharsets;
  import java.util.ArrayList;
  import java.util.Arrays;
+ import java.util.Collections;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.TreeMap;
@@@ -519,6 -524,30 +521,30 @@@ public final class BCFile 
      }
    }
  
+   // sha256 of some random data
 -  private static final byte[] NO_CPYPTO_KEY = "ce18cf53c4c5077f771249b38033fa14bcb31cca0e5e95a371ee72daa8342ea2".getBytes(Charsets.UTF_8);
++  private static final byte[] NO_CPYPTO_KEY = "ce18cf53c4c5077f771249b38033fa14bcb31cca0e5e95a371ee72daa8342ea2".getBytes(StandardCharsets.UTF_8);
+ 
+   // This class is used as a place holder in the cache for RFiles that have no crypto....
+   private static final BCFileCryptoModuleParameters NO_CRYPTO = new BCFileCryptoModuleParameters()
{
+ 
+     @Override
+     public Map<String,String> getAllOptions() {
+       return Collections.emptyMap();
+     }
+ 
+     @Override
+     public byte[] getEncryptedKey() {
+       return NO_CPYPTO_KEY;
+     }
+ 
+     @Override
+     public String getOpaqueKeyEncryptionKeyID() {
+       // NONE + sha256 of random data
+       return "NONE:a4007e6aefb095a5a47030cd6c850818fb3a685dc6e85ba1ecc5a44ba68b193b";
+     }
+ 
+   };
+ 
    private static class BCFileCryptoModuleParameters extends CryptoModuleParameters {
  
      public void write(DataOutput out) throws IOException {


Mime
View raw message