Examples of deserialize()


Examples of org.apache.directory.server.core.partition.impl.btree.jdbm.ServerEntrySerializer.deserialize()

        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
       
        byte[] data = ses.serialize( entry );
       
        ServerEntry result = (ServerEntry)ses.deserialize( data );
       
        assertEquals( entry, result );
    }

View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.DefaultServerAttribute.deserialize()

        try
        {
            oIn = new ObjectInputStream( in );

            DefaultServerAttribute value = new DefaultServerAttribute( at );
            value.deserialize( oIn );
           
            return value;
        }
        catch ( IOException ioe )
        {
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.DefaultServerEntry.deserialize()

        DefaultServerEntry serverEntry = new DefaultServerEntry( schemaManager );
       
        try
        {
            serverEntry.deserialize( in );
           
            return serverEntry;
        }
        catch ( ClassNotFoundException cnfe )
        {
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.ServerModification.deserialize()

        try
        {
            oIn = new ObjectInputStream( in );

            ServerModification value = new ServerModification();
            value.deserialize( oIn, schemaManager );

            return value;
        }
        catch ( IOException ioe )
        {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.SerDe.deserialize()

        (IntObjectInspector) fields.get(0).getFieldObjectInspector();
    assertEquals(0.0, reader.getProgress(), 0.00001);
    assertEquals(0, reader.getPos());
    while (reader.next(key, value)) {
      assertEquals(++rowNum, intInspector.get(inspector.
          getStructFieldData(serde.deserialize(value), fields.get(0))));
      assertEquals(2, intInspector.get(inspector.
          getStructFieldData(serde.deserialize(value), fields.get(1))));
    }
    assertEquals(3, rowNum);
    assertEquals(1.0, reader.getProgress(), 0.00001);
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe.deserialize()

        Configuration hiveConf = new HiveConf(conf, SessionState.class);
        ColumnarSerDe serde = new ColumnarSerDe();
        serde.initialize(hiveConf, props);

        return (ColumnarStruct) serde.deserialize(buff);
   }


    /**
     * Writes out a simple temporary file with 5 columns and 100 rows.<br/>
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe.deserialize()

    dsp.setProperty(Constants.SERIALIZATION_LIB, ds.getClass().toString());
    dsp.setProperty(Constants.FIELD_DELIM, "9");
    ds.initialize(new Configuration(), dsp);

    String row = client.fetchOne();
    Object o = ds.deserialize(new BytesWritable(row.getBytes()));

    assertEquals(o.getClass().toString(), "class java.util.ArrayList");
    List<?> lst = (List<?>) o;
    assertEquals(lst.get(0), 238);
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.deserialize()

            LazySimpleSerDe testSD = new LazySimpleSerDe();
            testSD.initialize(conf, tblProps);

            Writable s3 = testSD.serialize(s, hrsd.getObjectInspector());
            LOG.info("THREE: {}", s3);
            Object o3 = testSD.deserialize(s3);
            Assert.assertFalse(r.getClass().equals(o3.getClass()));

            // then serialize again using hrsd, and compare results
            HCatRecord s4 = (HCatRecord) hrsd.serialize(o3, testSD.getObjectInspector());
            LOG.info("FOUR: {}", s4);
View Full Code Here

Examples of org.apache.hadoop.io.serializer.Deserializer.deserialize()

            d.open((InputStream) is);
            wrappedSplits = new InputSplit[splitLen];
            for (int i = 0; i < splitLen; i++)
            {
                wrappedSplits[i] = (InputSplit)ReflectionUtils.newInstance(splitClass, conf);
                d.deserialize(wrappedSplits[i]);
            }
        } catch (ClassNotFoundException e) {
            throw new IOException(e);
        }
       
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.FileHandle.deserialize()

    handle.serialize(xdr);
    Assert.assertEquals(handle.getFileId(), 1024);

    // Deserialize it back
    FileHandle handle2 = new FileHandle();
    handle2.deserialize(xdr.asReadOnlyWrap());
    Assert.assertEquals("Failed: Assert 1024 is id ", 1024,
            handle.getFileId());
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.