use of org.pentaho.di.core.row.value.ValueMetaBase in project pentaho-cassandra-plugin by pentaho.
the class CQL3SSTableWriterTest method getCql3SSTableWriter.
private CQL3SSTableWriter getCql3SSTableWriter() {
CQL3SSTableWriter writer = new CQL3SSTableWriterStub();
writer.setPrimaryKey(KEY_FIELD);
RowMetaInterface rmi = mock(RowMetaInterface.class);
ValueMetaInterface one = new ValueMetaBase(KEY_FIELD, ValueMetaBase.TYPE_INTEGER);
ValueMetaInterface two = new ValueMetaBase(COLUMN, ValueMetaBase.TYPE_STRING);
List<ValueMetaInterface> valueMetaList = new ArrayList<ValueMetaInterface>();
valueMetaList.add(one);
valueMetaList.add(two);
String[] fieldNames = new String[] { "key", "two" };
doReturn(valueMetaList).when(rmi).getValueMetaList();
doReturn(fieldNames).when(rmi).getFieldNames();
writer.setRowMeta(rmi);
writer.setBufferSize(BUFFER_SIZE);
writer.setTable(TABLE);
writer.setKeyspace(KEY_SPACE);
writer.setDirectory(DIRECTORY_PATH);
writer.setPartitionerClass("org.apache.cassandra.dht.Murmur3Partitioner");
return writer;
}
Aggregations