Package io.druid.indexing.overlord.setup

Examples of io.druid.indexing.overlord.setup.StringEC2UserData


  @Test
  public void testStringEC2UserDataSerde() throws IOException
  {
    final String json = "{\"impl\":\"string\",\"data\":\"hey :ver:\",\"versionReplacementString\":\":ver:\",\"version\":\"1234\"}";
    final StringEC2UserData userData = (StringEC2UserData) TestUtils.MAPPER.readValue(json, EC2UserData.class);
    Assert.assertEquals("hey :ver:", userData.getData());
    Assert.assertEquals("1234", userData.getVersion());
    Assert.assertEquals(
        Base64.encodeBase64String("hey 1234".getBytes(Charsets.UTF_8)),
        userData.getUserDataBase64()
    );
    Assert.assertEquals(
        Base64.encodeBase64String("hey xyz".getBytes(Charsets.UTF_8)),
        userData.withVersion("xyz").getUserDataBase64()
    );
  }
View Full Code Here

TOP

Related Classes of io.druid.indexing.overlord.setup.StringEC2UserData

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.