Examples of toBytes()


Examples of org.lilyproject.repository.impl.BlobStoreAccessConfig.toBytes()

        SizeBasedBlobStoreAccessFactory blobStoreAccessFactory = new SizeBasedBlobStoreAccessFactory(blobStoreAccesses,
                blobStoreAccessConfig);
        blobManager = new BlobManagerImpl(tableFactory, blobStoreAccessFactory, false);

        publishBlobAccessParams(zk, dfsUri.toString());
        publishBlobStoreAccessConfig(zk, blobStoreAccessConfig.toBytes());
    }

    @PreDestroy
    public void stop() {
        // Since CDH4: don't close connection as this seems to close it for other clients (such as HBase)
View Full Code Here

Examples of org.nfctools.mf.tlv.LockControlTlv.toBytes()

public class MemoyLayoutTest {

  @Test
  public void testLockControlTlv() throws Exception {
    LockControlTlv lockControlTlv = MemoryLayout.ULTRALIGHT_C.createLockControlTlv();
    assertArrayEquals(new byte[] { (byte)0xA0, 0x10, 0x44 }, lockControlTlv.toBytes());
  }

  @Test
  public void testCreateCapabilityBlockUltralightC() throws Exception {
    CapabilityBlock capabilityBlock = MemoryLayout.ULTRALIGHT_C.createCapabilityBlock();
View Full Code Here

Examples of org.postgresql.util.PGBinaryObject.toBytes()

            throw new PSQLException(GT.tr("Unknown type {0}.", typename), PSQLState.INVALID_PARAMETER_TYPE);

        if ((x instanceof PGBinaryObject) && connection.binaryTransferSend(oid)) {
            PGBinaryObject binObj = (PGBinaryObject) x;
            byte[] data = new byte[binObj.lengthInBytes()];
            binObj.toBytes(data, 0);
            bindBytes(parameterIndex, data, oid);
        } else {
            setString(parameterIndex, x.getValue(), oid);
        }
    }
View Full Code Here

Examples of org.voltdb.sysprocs.saverestore.SnapshotPredicates.toBytes()

                                        .put(0x00000000, 0x7fffffff)
                                        .build(0),
                                true);

        // Build the index
        sourceEngine.activateTableStream(STOCK_TABLEID, TableStreamType.ELASTIC_INDEX, Long.MAX_VALUE, predicates.toBytes());

        // Humor serializeMore() by providing a buffer, even though it's not used.
        final BBContainer origin = DBBPool.allocateDirect(1024 * 1024 * 2);
        origin.b().clear();
        BBContainer container = new BBContainer(origin.b()){
View Full Code Here

Examples of parquet.column.values.rle.RunLengthBitPackingHybridEncoder.toBytes()

        while (iterator.hasNext()) {
          encoder.writeInt(iterator.next());
        }
        // encodes the bit width
        byte[] bytesHeader = new byte[] { (byte) bitWidth };
        BytesInput rleEncodedBytes = encoder.toBytes();
        if (DEBUG) LOG.debug("rle encoded bytes " + rleEncodedBytes.size());
        BytesInput bytes = concat(BytesInput.from(bytesHeader), rleEncodedBytes);
        if (firstPage && ((bytes.size() + dictionaryByteSize) > rawDataByteSize)) {
          fallBackToPlainEncoding();
        } else {
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.iterativereduce.NetworkWeightsUpdateable.toBytes()

    NeuralNetworkWeightsDelta nnwd = new NeuralNetworkWeightsDelta();
    nnwd.network = nn;
   
    nwu.set(nnwd);
   
    nwu.toBytes();
   
   
   
   
   
View Full Code Here

Examples of voldemort.serialization.SlopSerializer.toBytes()

            for(Versioned<Slop> slop: slops) {
                VectorClock clock = TestUtils.getClock(1);
                NodeValue<ByteArray, byte[]> nodeValue = new NodeValue<ByteArray, byte[]>(0,
                                                                                          slop.getValue()
                                                                                              .makeKey(),
                                                                                          new Versioned<byte[]>(slopSerializer.toBytes(slop.getValue()),
                                                                                                                clock));
                adminClient.storeOps.putNodeKeyValue("slop", nodeValue);
            }

            // wait for twice the slop interval (in case a slop push was
View Full Code Here

Examples of voldemort.serialization.SlopSerializer.toBytes()

                for(Integer destinationNodeId: vservers.keySet()) {
                    if(!destinationNodeId.equals(slopHostId)) {
                        ByteArray key = generateRandomKey(cluster, destinationNodeId, storeDef.getReplicationFactor());
                        serverKeys.get(destinationNodeId).add(new Pair<ByteArray, Integer>(key, slopHostId));
                        Slop slop = new Slop(storeDef.getName(), Slop.Operation.PUT, key.get(), key.get(), destinationNodeId, new Date());
                        slopStore.put(slop.makeKey(), new Versioned<byte[]>(slopSerializer.toBytes(slop), new VectorClock()), null);
                    }
                }
            }
        }
View Full Code Here

Examples of voldemort.serialization.SlopSerializer.toBytes()

                for(Integer destinationNodeId: vservers.keySet()) {
                    if(!destinationNodeId.equals(slopHostId)) {
                        ByteArray key = generateRandomKey(cluster, destinationNodeId, storeDef.getReplicationFactor());
                        serverKeys.get(destinationNodeId).add(new Pair<ByteArray, Integer>(key, slopHostId));
                        Slop slop = new Slop(storeDef.getName(), Slop.Operation.PUT, key.get(), key.get(), destinationNodeId, new Date());
                        slopStore.put(slop.makeKey(), new Versioned<byte[]>(slopSerializer.toBytes(slop), new VectorClock()), null);
                    }
                }
            }
        }
View Full Code Here

Examples of voldemort.serialization.json.JsonTypeSerializer.toBytes()

            @Override
            public void doOperation(int index) throws Exception {
                try {
                    totalResults.incrementAndGet();
                    int curr = current.getAndIncrement();
                    List<Versioned<byte[]>> results = store.get(new ByteArray(keySerializer.toBytes(requestIds.take())),
                                                                null);
                    if(curr % progressIncrement == 0)
                        System.out.println(curr);

                    if(results.size() == 0)
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.