@Test(expected = IllegalArgumentException.class) public void testGetSchemaForTypeBadType() throws Exception { AbstractCassandraProcessor.getSchemaForType("nothing"); }
public static Schema getSchemaForType(String dataType) { SchemaBuilder.TypeBuilder<Schema> typeBuilder = SchemaBuilder.builder(); Schema returnSchema; switch (dataType) { case "string": returnSchema = typeBuilder.stringType(); break; case "boolean": returnSchema = typeBuilder.booleanType(); break; case "int": returnSchema = typeBuilder.intType(); break; case "long": returnSchema = typeBuilder.longType(); break; case "float": returnSchema = typeBuilder.floatType(); break; case "double": returnSchema = typeBuilder.doubleType(); break; case "bytes": returnSchema = typeBuilder.bytesType(); break; default: throw new IllegalArgumentException("Unknown Avro primitive type: " + dataType); } return returnSchema; }
AbstractCassandraProcessor extends AbstractProcessor { public static Schema getSchemaForType(String dataType) { SchemaBuilder.TypeBuilder<Schema> typeBuilder = SchemaBuilder.builder(); Schema returnSchema; switch (dataType) { case "string": returnSchema = typeBuilder.stringType(); break; case "boolean": returnSchema = typeBuilder.booleanType(); break; case "int": returnSchema = typeBuilder.intType(); break; case "long": returnSchema = typeBuilder.longType(); break; case "float": returnSchema = typeBuilder.floatType(); break; case "double": returnSchema = typeBuilder.doubleType(); break; case "bytes": returnSchema = typeBuilder.bytesType(); break; default: throw new IllegalArgumentException("Unknown Avro primitive type: " + dataType); } return returnSchema; } }
AbstractCassandraProcessor extends AbstractProcessor { public static Schema getSchemaForType(String dataType) { SchemaBuilder.TypeBuilder<Schema> typeBuilder = SchemaBuilder.builder(); Schema returnSchema; switch (dataType) { case "string": returnSchema = typeBuilder.stringType(); break; case "boolean": returnSchema = typeBuilder.booleanType(); break; case "int": returnSchema = typeBuilder.intType(); break; case "long": returnSchema = typeBuilder.longType(); break; case "float": returnSchema = typeBuilder.floatType(); break; case "double": returnSchema = typeBuilder.doubleType(); break; case "bytes": returnSchema = typeBuilder.bytesType(); break; default: throw new IllegalArgumentException("Unknown Avro primitive type: " + dataType); } return returnSchema; }  }
AbstractCassandraProcessor extends AbstractProcessor { public static Schema getSchemaForType(String dataType) { SchemaBuilder.TypeBuilder<Schema> typeBuilder = SchemaBuilder.builder(); Schema returnSchema; switch (dataType) { case "string": returnSchema = typeBuilder.stringType(); break; case "boolean": returnSchema = typeBuilder.booleanType(); break; case "int": returnSchema = typeBuilder.intType(); break; case "long": returnSchema = typeBuilder.longType(); break; case "float": returnSchema = typeBuilder.floatType(); break; case "double": returnSchema = typeBuilder.doubleType(); break; case "bytes": returnSchema = typeBuilder.bytesType(); break; default: throw new IllegalArgumentException("Unknown Avro primitive type: " + dataType); } return returnSchema; }  void stop(); static Schema getUnionFieldType(String dataType); static Schema getSchemaForType(String dataType); static String getPrimitiveAvroTypeFromCassandraType(DataType dataType); static DataType getPrimitiveDataTypeFromString(String dataTypeName); List<InetSocketAddress> getContactPoints(String contactPointList); }
AbstractCassandraProcessor extends AbstractProcessor { public static Schema getSchemaForType(String dataType) { SchemaBuilder.TypeBuilder<Schema> typeBuilder = SchemaBuilder.builder(); Schema returnSchema; switch (dataType) { case "string": returnSchema = typeBuilder.stringType(); break; case "boolean": returnSchema = typeBuilder.booleanType(); break; case "int": returnSchema = typeBuilder.intType(); break; case "long": returnSchema = typeBuilder.longType(); break; case "float": returnSchema = typeBuilder.floatType(); break; case "double": returnSchema = typeBuilder.doubleType(); break; case "bytes": returnSchema = typeBuilder.bytesType(); break; default: throw new IllegalArgumentException("Unknown Avro primitive type: " + dataType); } return returnSchema; }  void stop(); static Schema getUnionFieldType(String dataType); static Schema getSchemaForType(String dataType); static String getPrimitiveAvroTypeFromCassandraType(DataType dataType); static DataType getPrimitiveDataTypeFromString(String dataTypeName); List<InetSocketAddress> getContactPoints(String contactPointList); static final int DEFAULT_CASSANDRA_PORT; static final PropertyDescriptor CONTACT_POINTS; static final PropertyDescriptor KEYSPACE; static final PropertyDescriptor PROP_SSL_CONTEXT_SERVICE; static final PropertyDescriptor CLIENT_AUTH; static final PropertyDescriptor USERNAME; static final PropertyDescriptor PASSWORD; static final PropertyDescriptor CONSISTENCY_LEVEL; static final PropertyDescriptor CHARSET; }