Code example for Properties

Methods: put

0
 
public class FieldAliasTest { 
 
    @Test 
    public void testFieldMap() throws Exception { 
        Properties tableProperties = new Properties();
        tableProperties.put("es.column.aliases", "timestamp:@timestamp , foo:123foo");
        FieldAlias alias = HiveUtils.alias(new PropertiesSettings(tableProperties));
        assertEquals("@timestamp", alias.toES("timestamp"));
        assertEquals("123foo", alias.toES("foo"));
        assertEquals("bar", alias.toES("BaR"));
 
    } 
}