Package com.linkedin.databus.core

Examples of com.linkedin.databus.core.DbusEventKey


  {
    byte[] payload = new byte[((DbusEventInternalReadable)ev).payloadLength()];
    ev.value().get(payload);
    if ((_numDataEventsBeforeSkip < 0) || (dataEventCount < _numDataEventsBeforeSkip))
    {
      _buffer.appendEvent(new DbusEventKey(ev.key()),
                          ev.physicalPartitionId(),
                          ev.logicalPartitionId(),
                          ev.timestampInNanos(),
                          ev.srcId(),
                          ev.schemaId(),
View Full Code Here


    ByteBuffer b = ev.value();
    byte[] bytes = new byte[b.remaining()];
    b.get(bytes);
    for (int i=0;i < numCheckpoints;++i)
    {
      _buffer.appendEvent(new DbusEventKey(ev.key()),
                          ev.physicalPartitionId(),
                          ev.logicalPartitionId(),
                          ev.timestampInNanos(),
                          ev.srcId(),
                          ev.schemaId(),
View Full Code Here

                                                (short) 1,         // srcId
                                                SOURCE1_SCHEMAID,  // payloadSchemaMd5
                                                SOURCE1_PAYLOAD,   // payload
                                                false,             // enableTracing
                                                true);             // autocommit
    DbusEventKey key = new DbusEventKey("myKey".getBytes(Charset.forName("UTF-8")));
    ByteBuffer buf = ByteBuffer.allocate(1000).order(ByteOrder.BIG_ENDIAN);
    try
    {
      DbusEventFactory.serializeEvent(key, buf, eventInfo);
    }
View Full Code Here

                                    Hashtable<Long, AtomicInteger> keyCounts)
  {
    for (long i = 0; i < numEvents; ++i)
    {
      try {
        eventsBuf.appendEvent(new DbusEventKey(keyBase + i), (short) 0, (short)1, (short)0, srcId,
                              new byte[16], "value1".getBytes("UTF-8"), false);
      } catch (UnsupportedEncodingException e) {
        //ignore
      }
      keyCounts.put(keyBase + i, new AtomicInteger(0));
View Full Code Here

                                                true,  // auto-commit
                                                DbusEventFactory.DBUS_EVENT_V2,
                                                PAYLOAD_SCHEMA_VERSION,
                                                metadataPart);
    DbusEventFactory eventFactory = new DbusEventV2Factory();
    DbusEventKey eventKey = new DbusEventKey(LONG_KEY);
    ByteBuffer serialBuf = ByteBuffer.allocate(maxEventLen).order(eventFactory.getByteOrder());
    DbusEventFactory.serializeEvent(eventKey, serialBuf, eventInfo);

    return eventFactory.createReadOnlyDbusEventFromBuffer(serialBuf, 0);
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.core.DbusEventKey

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.