Tabnine Logo
WireCommands$CreateTableSegment.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
io.pravega.shared.protocol.netty.WireCommands$CreateTableSegment
constructor

Best Java code snippets using io.pravega.shared.protocol.netty.WireCommands$CreateTableSegment.<init> (Showing top 9 results out of 315)

origin: pravega/pravega

  public static WireCommand readFrom(DataInput in, int length) throws IOException {
    long requestId = in.readLong();
    String segment = in.readUTF();
    String delegationToken = in.readUTF();
    return new CreateTableSegment(requestId, segment, delegationToken);
  }
}
origin: pravega/pravega

WireCommands.CreateTableSegment request = new WireCommands.CreateTableSegment(requestId, qualifiedStreamSegmentName, delegationToken);
sendRequestAsync(request, replyProcessor, result, clientCF, ModelHelper.encode(uri));
return result;
origin: pravega/pravega

processor.createTableSegment(new WireCommands.CreateTableSegment(1, streamSegmentName, ""));
order.verify(connection).send(new WireCommands.SegmentCreated(1, streamSegmentName));
origin: pravega/pravega

processor.createTableSegment(new WireCommands.CreateTableSegment(1, streamSegmentName, ""));
order.verify(connection).send(new WireCommands.SegmentCreated(1, streamSegmentName));
TableEntry entry = TableEntry.unversioned(keys.get(0), generateValue(rnd));
origin: pravega/pravega

processor.createTableSegment(new WireCommands.CreateTableSegment(1, streamSegmentName, ""));
order.verify(connection).send(new WireCommands.SegmentCreated(1, streamSegmentName));
TableEntry e1 = TableEntry.unversioned(keys.get(0), generateValue(rnd));
origin: pravega/pravega

@Test(timeout = 30000)
public void testDeleteTableWithData() throws Exception {
  // Set up PravegaRequestProcessor instance to execute requests against
  val rnd = new Random(0);
  String streamSegmentName = "testTable";
  @Cleanup
  ServiceBuilder serviceBuilder = newInlineExecutionInMemoryBuilder(getBuilderConfig());
  serviceBuilder.initialize();
  StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
  TableStore tableStore = serviceBuilder.createTableStoreService();
  ServerConnection connection = mock(ServerConnection.class);
  InOrder order = inOrder(connection);
  PravegaRequestProcessor processor = new PravegaRequestProcessor(store, tableStore, connection);
  // Generate keys.
  ArrayList<HashedArray> keys = generateKeys(2, rnd);
  // Create a table segment and add data.
  processor.createTableSegment(new WireCommands.CreateTableSegment(3, streamSegmentName, ""));
  order.verify(connection).send(new WireCommands.SegmentCreated(3, streamSegmentName));
  TableEntry e1 = TableEntry.unversioned(keys.get(0), generateValue(rnd));
  processor.updateTableEntries(new WireCommands.UpdateTableEntries(4, streamSegmentName, "", getTableEntries(singletonList(e1))));
  order.verify(connection).send(new WireCommands.TableEntriesUpdated(4, singletonList(0L)));
  // Delete a table segment which has data.
  processor.deleteTableSegment(new WireCommands.DeleteTableSegment(5, streamSegmentName,  true, ""));
  order.verify(connection).send(new WireCommands.TableSegmentNotEmpty(5, streamSegmentName, ""));
}
origin: pravega/pravega

@Test(timeout = 30000)
public void testDeleteTableWithoutData() throws Exception {
  // Set up PravegaRequestProcessor instance to execute requests against
  val rnd = new Random(0);
  String streamSegmentName = "testTable1";
  @Cleanup
  ServiceBuilder serviceBuilder = newInlineExecutionInMemoryBuilder(getBuilderConfig());
  serviceBuilder.initialize();
  StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
  TableStore tableStore = serviceBuilder.createTableStoreService();
  ServerConnection connection = mock(ServerConnection.class);
  InOrder order = inOrder(connection);
  PravegaRequestProcessor processor = new PravegaRequestProcessor(store, tableStore, connection);
  // Generate keys.
  ArrayList<HashedArray> keys = generateKeys(2, rnd);
  // Create a table segment.
  processor.createTableSegment(new WireCommands.CreateTableSegment(1, streamSegmentName, ""));
  order.verify(connection).send(new WireCommands.SegmentCreated(1, streamSegmentName));
  processor.deleteTableSegment(new WireCommands.DeleteTableSegment(2, streamSegmentName,  true, ""));
  order.verify(connection).send(new WireCommands.SegmentDeleted(2, streamSegmentName));
}
origin: pravega/pravega

@Test(timeout = 20000)
public void testCreateTableSegment() throws Exception {
  // Set up PravegaRequestProcessor instance to execute requests against
  String streamSegmentName = "testCreateTableSegment";
  @Cleanup
  ServiceBuilder serviceBuilder = newInlineExecutionInMemoryBuilder(getBuilderConfig());
  serviceBuilder.initialize();
  StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
  TableStore tableStore = serviceBuilder.createTableStoreService();
  ServerConnection connection = mock(ServerConnection.class);
  InOrder order = inOrder(connection);
  PravegaRequestProcessor processor = new PravegaRequestProcessor(store, tableStore, connection);
  // Execute and Verify createTableSegment calling stack is executed as design.
  processor.createTableSegment(new WireCommands.CreateTableSegment(1, streamSegmentName, ""));
  order.verify(connection).send(new WireCommands.SegmentCreated(1, streamSegmentName));
  processor.createTableSegment(new WireCommands.CreateTableSegment(2, streamSegmentName, ""));
  order.verify(connection).send(new WireCommands.SegmentAlreadyExists(2, streamSegmentName, ""));
}
origin: pravega/pravega

@Test
public void testCreateTableSegment() throws IOException {
  testCommand(new WireCommands.CreateTableSegment(l, testString1, ""));
}
io.pravega.shared.protocol.nettyWireCommands$CreateTableSegment<init>

Popular methods of WireCommands$CreateTableSegment

  • getDelegationToken
  • getRequestId
  • getSegment

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now