Package ivory.lsh.data

Examples of ivory.lsh.data.PairOfIntNBitSignature


  public void testReadWrite() throws IOException{
    //write
    SequenceFile.Writer w = SequenceFile.createWriter(FileSystem.getLocal(new Configuration()), new Configuration(),
        new Path(TMP_FILENAME1), IntWritable.class, PairOfIntNBitSignature.class);
   
    PairOfIntNBitSignature p1 = new PairOfIntNBitSignature(1, null);
    PairOfIntNBitSignature p2 = new PairOfIntNBitSignature(2, new NBitSignature(100));
    PairOfIntNBitSignature p3 = new PairOfIntNBitSignature(3, null);

    w.append(new IntWritable(1), p1);
    w.append(new IntWritable(2), p2);
    w.append(new IntWritable(3), p3);
    w.close();
View Full Code Here


    FileSystem fs = FileSystem.getLocal(conf);
    // write
    SequenceFile.Writer w = SequenceFile.createWriter(fs, conf,
        new Path(TMP_FILENAME1), IntWritable.class, PairOfIntNBitSignature.class);

    PairOfIntNBitSignature p1 = new PairOfIntNBitSignature(1, null);
    PairOfIntNBitSignature p2 = new PairOfIntNBitSignature(2, new NBitSignature(100));
    PairOfIntNBitSignature p3 = new PairOfIntNBitSignature(3, null);

    w.append(new IntWritable(1), p1);
    w.append(new IntWritable(2), p2);
    w.append(new IntWritable(3), p3);
    w.close();
View Full Code Here

TOP

Related Classes of ivory.lsh.data.PairOfIntNBitSignature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.