public TableMeta(String dataFormat, KeyValueSet propertySet) { this.dataFormat = dataFormat; this.propertySet = new KeyValueSet(propertySet); }
public TableMeta(String dataFormat, KeyValueSet options) { this.dataFormat = dataFormat; this.options = new KeyValueSet(options); }
public static KeyValueSet create(KeyValueSet keyValueSet) { return new KeyValueSet(keyValueSet); }
public static KeyValueSet create(KeyValueSet keyValueSet) { return new KeyValueSet(keyValueSet); }
private void init() { this.properties = new KeyValueSet(); this.unsetPropertyKeys = Sets.newHashSet(); }
public static KeyValueSetProto convertFromMap(Map<String, String> map) { return new KeyValueSet(map).getProto(); }
public LegacyClientDelegate(ServiceDiscovery discovery, Properties clientParams) { super(new DelegateServiceTracker(discovery), null, new KeyValueSet(clientParams == null ? new HashMap<String, String>() : Maps.fromProperties(clientParams))); queryClient = new QueryClientImpl(this); }
public LegacyClientDelegate(ServiceDiscovery discovery, Properties clientParams) { super(new DelegateServiceTracker(discovery), null, new KeyValueSet(clientParams == null ? new HashMap<String, String>() : Maps.fromProperties(clientParams))); queryClient = new QueryClientImpl(this); }
public TableMeta(TableProto proto) { this.dataFormat = proto.getDataFormat(); this.options = new KeyValueSet(proto.getParams()); }
public TableMeta(TableProto proto) { this.dataFormat = proto.getDataFormat(); this.propertySet = new KeyValueSet(proto.getParams()); }
public LegacyClientDelegate(String host, int port, Properties clientParams) { super(new DummyServiceTracker(NetUtils.createSocketAddr(host, port)), null, new KeyValueSet(clientParams == null ? new HashMap<String, String>() : Maps.fromProperties(clientParams))); queryClient = new QueryClientImpl(this); }
public LegacyClientDelegate(String host, int port, Properties clientParams) { super(new DummyServiceTracker(NetUtils.createSocketAddr(host, port)), null, new KeyValueSet(clientParams == null ? new HashMap<String, String>() : Maps.fromProperties(clientParams))); queryClient = new QueryClientImpl(this); }
@Test(expected = UnavailableTableLocationException.class) public final void testCreateExternalTableUnavailableLocation() throws TajoException { client.createExternalTable("table128237", SchemaBuilder.empty(), URI.create("/tajo/test1bcd"), new TableMeta("TEXT", new KeyValueSet())); }
@Test(expected = DuplicateTableException.class) public final void testCreateExternalTableDuplicated() throws TajoException { client.createExternalTable("default.lineitem", SchemaBuilder.empty(), URI.create("/"), new TableMeta("TEXT", new KeyValueSet())); }
@Test(expected = InsufficientPrivilegeException.class) public final void testCreateExternalTableInsufficientPrivilege() throws TajoException { Path p = TajoConf.getWarehouseDir(conf); client.createExternalTable("information_schema.table1237891", SchemaBuilder.empty(), p.toUri(), new TableMeta("TEXT", new KeyValueSet())); }
public static ScanNode buildInputExecutor(LogicalPlan plan, DataChannel channel) { Preconditions.checkArgument(channel.getSchema() != null, "Channel schema (" + channel.getSrcId().getId() + " -> " + channel.getTargetId().getId() + ") is not initialized"); TableMeta meta = new TableMeta(channel.getDataFormat(), new KeyValueSet()); TableDesc desc = new TableDesc( channel.getSrcId().toString(), channel.getSchema(), meta, StorageConstants.LOCAL_FS_URI); ScanNode scanNode = plan.createNode(ScanNode.class); scanNode.init(desc); return scanNode; }
public static ScanNode buildInputExecutor(LogicalPlan plan, DataChannel channel) { Preconditions.checkArgument(channel.getSchema() != null, "Channel schema (" + channel.getSrcId().getId() + " -> " + channel.getTargetId().getId() + ") is not initialized"); TableMeta meta = new TableMeta(channel.getDataFormat(), new KeyValueSet()); TableDesc desc = new TableDesc( channel.getSrcId().toString(), channel.getSchema(), meta, StorageConstants.LOCAL_FS_URI); ScanNode scanNode = plan.createNode(ScanNode.class); scanNode.init(desc); return scanNode; }
public Session(SessionProto proto) { sessionId = proto.getSessionId(); userName = proto.getUsername(); currentDatabase = proto.getCurrentDatabase(); lastAccessTime = proto.getLastAccessTime(); KeyValueSet keyValueSet = new KeyValueSet(proto.getVariables()); sessionVariables = keyValueSet.getAllKeyValus(); }
public Session(SessionProto proto) { sessionId = proto.getSessionId(); userName = proto.getUsername(); currentDatabase = proto.getCurrentDatabase(); lastAccessTime = proto.getLastAccessTime(); KeyValueSet keyValueSet = new KeyValueSet(proto.getVariables()); sessionVariables = keyValueSet.getAllKeyValus(); }
public static TableDesc getOutputTableDesc(LogicalPlan plan) { LogicalNode [] found = findAllNodes(plan.getRootNode().getChild(), NodeType.CREATE_TABLE, NodeType.INSERT); if (found.length == 0) { return new TableDesc(null, plan.getRootNode().getOutSchema(), "TEXT", new KeyValueSet(), null); } else { StoreTableNode storeNode = (StoreTableNode) found[0]; return new TableDesc( storeNode.getTableName(), storeNode.getOutSchema(), storeNode.getStorageType(), storeNode.getOptions(), storeNode.getUri()); } }