org.apache.accumulo.examples.simple.filedata
Class FileDataIngest

java.lang.Object
  extended by org.apache.accumulo.examples.simple.filedata.FileDataIngest

public class FileDataIngest
extends Object

Takes a list of files and archives them into Accumulo keyed on the SHA1 hashes of the files. See docs/examples/README.filedata for instructions.


Field Summary
static org.apache.hadoop.io.Text CHUNK_CF
           
static ByteSequence CHUNK_CF_BS
           
static org.apache.hadoop.io.Text REFS_CF
           
static ByteSequence REFS_CF_BS
           
static String REFS_FILE_EXT
           
static String REFS_ORIG_FILE
           
 
Constructor Summary
FileDataIngest(int chunkSize, ColumnVisibility colvis)
           
 
Method Summary
static int bytesToInt(byte[] b, int offset)
           
 String hexString(byte[] bytes)
           
 String insertFileData(String filename, BatchWriter bw)
           
static byte[] intToBytes(int l)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHUNK_CF

public static final org.apache.hadoop.io.Text CHUNK_CF

REFS_CF

public static final org.apache.hadoop.io.Text REFS_CF

REFS_ORIG_FILE

public static final String REFS_ORIG_FILE
See Also:
Constant Field Values

REFS_FILE_EXT

public static final String REFS_FILE_EXT
See Also:
Constant Field Values

CHUNK_CF_BS

public static final ByteSequence CHUNK_CF_BS

REFS_CF_BS

public static final ByteSequence REFS_CF_BS
Constructor Detail

FileDataIngest

public FileDataIngest(int chunkSize,
                      ColumnVisibility colvis)
Method Detail

insertFileData

public String insertFileData(String filename,
                             BatchWriter bw)
                      throws MutationsRejectedException,
                             IOException
Throws:
MutationsRejectedException
IOException

bytesToInt

public static int bytesToInt(byte[] b,
                             int offset)

intToBytes

public static byte[] intToBytes(int l)

hexString

public String hexString(byte[] bytes)

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.