@Test public void testNonRecordPartitioner() { TestHelpers.assertThrows("Should reject JSON string partitioner", ValidationException.class, new Runnable() { @Override public void run() { PartitionStrategyParser.parse("[ " + "{\"type\": \"year\", \"source\": \"time\"}," + "\"cheese!\"" + " ]"); } } ); TestHelpers.assertThrows("Should reject JSON number partitioner", ValidationException.class, new Runnable() { @Override public void run() { PartitionStrategyParser.parse("[ " + "{\"type\": \"year\", \"source\": \"time\"}," + "34" + " ]"); } } ); TestHelpers.assertThrows("Should reject JSON array partitioner", ValidationException.class, new Runnable() { @Override public void run() { PartitionStrategyParser.parse("[ " + "{\"type\": \"year\", \"source\": \"time\"}," + "[ 1, 2, 3 ]" + " ]"); } } ); }
public static PartitionStrategy parse(String json) { return buildPartitionStrategy(JsonUtil.parse(json)); }
PartitionStrategyParser { public static PartitionStrategy parse(String json) { return buildPartitionStrategy(JsonUtil.parse(json)); } }
PartitionStrategyParser { public static PartitionStrategy parse(String json) { return buildPartitionStrategy(JsonUtil.parse(json)); }  }
PartitionStrategyParser { public static PartitionStrategy parse(String json) { return buildPartitionStrategy(JsonUtil.parse(json)); }  static PartitionStrategy parse(String json); static PartitionStrategy parse(File file); static PartitionStrategy parse(InputStream in); static boolean hasEmbeddedStrategy(Schema schema); static PartitionStrategy parseFromSchema(Schema schema); static Schema removeEmbeddedStrategy(Schema schema); static Schema embedPartitionStrategy(Schema schema, PartitionStrategy strategy); static String toString(PartitionStrategy strategy, boolean pretty); }
PartitionStrategyParser { public static PartitionStrategy parse(String json) { return buildPartitionStrategy(JsonUtil.parse(json)); }  static PartitionStrategy parse(String json); static PartitionStrategy parse(File file); static PartitionStrategy parse(InputStream in); static boolean hasEmbeddedStrategy(Schema schema); static PartitionStrategy parseFromSchema(Schema schema); static Schema removeEmbeddedStrategy(Schema schema); static Schema embedPartitionStrategy(Schema schema, PartitionStrategy strategy); static String toString(PartitionStrategy strategy, boolean pretty);  }