Package com.linkedin.databus2.core.container.request

Examples of com.linkedin.databus2.core.container.request.RegisterResponseEntry


        List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l2 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l3 = new ArrayList<RegisterResponseEntry>();

        l1.add(new RegisterResponseEntry(1L, (short)1,SOURCE1_SCHEMA_STR));
        l2.add(new RegisterResponseEntry(2L, (short)1,SOURCE2_SCHEMA_STR));
        l3.add(new RegisterResponseEntry(3L, (short)1,SOURCE3_SCHEMA_STR));

        schemaMap.put(1L, l1);
        schemaMap.put(2L, l2);
        schemaMap.put(3L, l3);
View Full Code Here


        HashMap<Long, List<RegisterResponseEntry>> schemaMap =
                new HashMap<Long, List<RegisterResponseEntry>>();

        short srcId=1;
        List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
        l1.add(new RegisterResponseEntry(1L, srcId,SOURCE1_SCHEMA_STR));

        schemaMap.put(1L, l1);

        Map<Long, IdNamePair> sourcesMap = new HashMap<Long, IdNamePair>();
        List<String> sources = new ArrayList<String>();
View Full Code Here

      HashMap<Long, List<RegisterResponseEntry>> schemaMap =
              new HashMap<Long, List<RegisterResponseEntry>>();

      short srcId=1;
      List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
      l1.add(new RegisterResponseEntry(1L, srcId,SOURCE1_SCHEMA_STR));

      schemaMap.put(1L, l1);

      Map<Long, IdNamePair> sourcesMap = new HashMap<Long, IdNamePair>();
      List<String> sources = new ArrayList<String>();
View Full Code Here

      List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
      List<RegisterResponseEntry> l2 = new ArrayList<RegisterResponseEntry>();
      List<RegisterResponseEntry> l3 = new ArrayList<RegisterResponseEntry>();

      l1.add(new RegisterResponseEntry(1L, (short)1,SOURCE1_SCHEMA_STR));
      l2.add(new RegisterResponseEntry(2L, (short)1,SOURCE2_SCHEMA_STR));
      l3.add(new RegisterResponseEntry(3L, (short)1,SOURCE3_SCHEMA_STR));

      schemaMap.put(1L, l1);
      schemaMap.put(2L, l2);
      schemaMap.put(3L, l3);
View Full Code Here

      List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
      List<RegisterResponseEntry> l2 = new ArrayList<RegisterResponseEntry>();
      List<RegisterResponseEntry> l3 = new ArrayList<RegisterResponseEntry>();

      l1.add(new RegisterResponseEntry(1L, (short)1,SOURCE1_SCHEMA_STR));
      l2.add(new RegisterResponseEntry(2L, (short)1,SOURCE2_SCHEMA_STR));
      l3.add(new RegisterResponseEntry(3L, (short)1,SOURCE3_SCHEMA_STR));

      schemaMap.put(1L, l1);
      schemaMap.put(2L, l2);
      schemaMap.put(3L, l3);
View Full Code Here

    List<IdNamePair> sourcesResponse = new ArrayList<IdNamePair>();
    sourcesResponse.add(new IdNamePair(1L, "source1"));

    Map<Long, List<RegisterResponseEntry>> registerSourcesResponse = new HashMap<Long, List<RegisterResponseEntry>>();
    List<RegisterResponseEntry> regResponse = new ArrayList<RegisterResponseEntry>();
    regResponse.add(new RegisterResponseEntry(1L, (short)1, SCHEMA$.toString()));
    registerSourcesResponse.put(1L, regResponse);

    ChunkedBodyReadableByteChannel channel = EasyMock.createMock(ChunkedBodyReadableByteChannel.class);

    if ( ! readDataException)
View Full Code Here

    List<ServerInfo> relayOrder = new ArrayList<ServerInfo>(relays);

    List<IdNamePair> sourcesResponse = new ArrayList<IdNamePair>();
    sourcesResponse.add(new IdNamePair(1L, "source1"));

    RegisterResponseEntry rre1 = new RegisterResponseEntry(1L, (short)1, SCHEMA$.toString());
    final HashMap<Long, List<RegisterResponseEntry>> registerResponseSources =
        new HashMap<Long, List<RegisterResponseEntry>>()// mapping of sourceId to list of schema versions for that ID
    registerResponseSources.put(1L, Arrays.asList(rre1));

    ChunkedBodyReadableByteChannel channel = new MockChunkedBodyReadableByteChannel(clientReadBufferSize+10);
View Full Code Here

    }

    List<IdNamePair> sourcesResponse = new ArrayList<IdNamePair>();
    sourcesResponse.add(new IdNamePair(1L, "source1"));

    RegisterResponseEntry rre1 = new RegisterResponseEntry(1L, (short)1, SCHEMA$.toString());
    final HashMap<Long, List<RegisterResponseEntry>> registerResponse =
        new HashMap<Long, List<RegisterResponseEntry>>();
    registerResponse.put(1L, Arrays.asList(rre1));

    //This guy succeeds on both /sources and /register
View Full Code Here

    assertTrue("obj.get(\"id\") type = " + obj.get("id").getClass().getName() + ", not Integer",
               obj.get("id") instanceof Integer);
    assertTrue("obj.get(\"version\") type = " + obj.get("version").getClass().getName() + ", not Integer",
               obj.get("version") instanceof Integer);
    RegisterResponseEntry rre = new RegisterResponseEntry((Integer)obj.get("id"),
                                                          ((Integer)obj.get("version")).shortValue(),
                                                          (String)obj.get("schema"));
    assertEquals("unexpected source id", 4002, rre.getId());
    Schema resSchema = Schema.parse(rre.getSchema());
    assertEquals("unexpected source-schema name for source id 4002", "test4.source2_v1", resSchema.getFullName());

    // There's no guarantee of a metadataSchemas entry in general, but we pre-stuffed our
    // VersionedSchemaSetBackedRegistryService with one in the test's constructor, so we
    // expect the relay to hand it back to us.  Or else.
View Full Code Here

    {
      Assert.fail("ObjectMapper failed unexpectedly");
    }
    assertNotNull("missing source schemas in response", sourceSchemasList);
    assertEquals("expected one source schema", 1, sourceSchemasList.size());
    RegisterResponseEntry rre = sourceSchemasList.get(0);
    assertEquals("unexpected source id", 4002, rre.getId());
    Schema resSchema = Schema.parse(rre.getSchema());
    assertEquals("unexpected source-schema name for source id 4002", "test4.source2_v1", resSchema.getFullName());

    // protocolVersion == 3:  as with v2 above; just do a quick sanity check
    httpRequest =
        new DefaultHttpRequest(HttpVersion.HTTP_1_1,
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.core.container.request.RegisterResponseEntry

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.