public void init(SploutConfiguration config) { this.config = config; timeoutThread = new TimeoutThread(config.getLong(DNodeProperties.MAX_QUERY_TIME)); timeoutThread.start(); }
/** * Constructor. * * @throws FileNotFoundException */ public ThriftReader(File file) throws FileNotFoundException { this.file = file; open(); }
public DeployInfo deploy(String tablespace, PartitionMap partitionMap, ReplicationMap replicationMap, URI dataUri) throws IOException { DeployRequest deployRequest = new DeployRequest(); deployRequest.setTablespace(tablespace); deployRequest.setData_uri(dataUri.toString()); deployRequest.setPartitionMap(partitionMap.getPartitionEntries()); deployRequest.setReplicationMap(replicationMap.getReplicationEntries()); return deploy(deployRequest); }
public SploutState(boolean failFast, String... qNodes) { this.sploutClient = new SploutClient(qNodes); this.failFast = failFast; }
@Override public int compare(Tablespace tb1, Tablespace tb2) { // reverse ordering. Older dates appears LAST. If same date, then version is compared. int comp = -((Long) tb1.getCreationDate()).compareTo(tb2.getCreationDate()); if (comp == 0) { return -((Long) tb1.getVersion()).compareTo(tb2.getVersion()); } else { return comp; } } });
@Override public void retryLogic() { testConfig.setProperty(DNodeProperties.PORT, testConfig.getInt(DNodeProperties.PORT) + 1); } };
public static void main(String[] args) throws SocketException { GetIPAddresses.getAllLocalIPs(); } }
/** * Constructor. * * @throws FileNotFoundException */ public ThriftWriter(File file) throws FileNotFoundException { this.file = file; open(); }
public static DNode getTestDNode(final SploutConfiguration testConfig, final IDNodeHandler handler, final String dataFolder) throws Throwable { return getTestDNode(testConfig, handler, dataFolder, true); }
public void close() { timeoutThread.interrupt(); }
public static SploutConfiguration get() { return get("."); }
public static <T> T deSer(String str, Class<T> clazz) throws JSONSerDeException { try { return (T) mapper.readValue(str, clazz); } catch (JsonParseException e) { throw new JSONSerDeException(e); } catch (JsonMappingException e) { throw new JSONSerDeException(e); } catch (IOException e) { throw new JSONSerDeException(e); } } }
public DeployInfo deploy(String tablespace, PartitionMap partitionMap, ReplicationMap replicationMap, URI dataUri) throws IOException { DeployRequest deployRequest = new DeployRequest(); deployRequest.setTablespace(tablespace); deployRequest.setData_uri(dataUri.toString()); deployRequest.setPartitionMap(partitionMap.getPartitionEntries()); deployRequest.setReplicationMap(replicationMap.getReplicationEntries()); return deploy(deployRequest); }
@Override public void retryLogic() { testConfig.setProperty(QNodeProperties.PORT, testConfig.getInt(QNodeProperties.PORT) + 1); } };