private static String formatEstimateAsDataSize(double value) { return isNaN(value) ? "?" : succinctBytes((long) value).toString(); }
estimates.getExecutionTime().ifPresent(e -> resourceEstimates.put(EXECUTION_TIME, e.toString())); estimates.getCpuTime().ifPresent(e -> resourceEstimates.put(CPU_TIME, e.toString())); estimates.getPeakMemory().ifPresent(e -> resourceEstimates.put(PEAK_MEMORY, e.toString()));
output.append(format(", Input: %s (%s)", formatPositions(nodeStats.getPlanNodeInputPositions()), nodeStats.getPlanNodeInputDataSize().toString())); nodeStats.getPlanNodeOutputDataSize().toString())); if (printFiltered) { double filtered = 100.0d * (nodeStats.getPlanNodeInputPositions() - nodeStats.getPlanNodeOutputPositions()) / nodeStats.getPlanNodeInputPositions();
HttpResponseFuture<PagesResponse> resultFuture = httpClient.executeAsync( prepareGet() .setHeader(PRESTO_MAX_SIZE, maxResponseSize.toString()) .setUri(uri).build(), new PageResponseHandler());
private static String formatEstimateAsDataSize(double value) { return isNaN(value) ? "?" : succinctBytes((long) value).toString(); }
@Override public String value() { return dataSize.toString(); }
@Override public String value() { return dataSize.toString(); }
private static String formatEstimateAsDataSize(double value) { return isNaN(value) ? "?" : succinctBytes((long) value).toString(); }
@Test(dataProvider = "printedValues") public void testToString(String expectedString, double value, DataSize.Unit unit) { assertEquals(new DataSize(value, unit).toString(), expectedString); }
@Test(dataProvider = "printedValues") public void testNonEnglishLocale(String expectedString, double value, DataSize.Unit unit) { synchronized (Locale.class) { Locale previous = Locale.getDefault(); Locale.setDefault(Locale.GERMAN); try { assertEquals(new DataSize(value, unit).toString(), expectedString); } finally { Locale.setDefault(previous); } } }
estimates.getExecutionTime().ifPresent(e -> resourceEstimates.put(EXECUTION_TIME, e.toString())); estimates.getCpuTime().ifPresent(e -> resourceEstimates.put(CPU_TIME, e.toString())); estimates.getPeakMemory().ifPresent(e -> resourceEstimates.put(PEAK_MEMORY, e.toString()));
output.append(format(", Input: %s (%s)", formatPositions(nodeStats.getPlanNodeInputPositions()), nodeStats.getPlanNodeInputDataSize().toString())); nodeStats.getPlanNodeOutputDataSize().toString())); if (printFiltered) { double filtered = 100.0d * (nodeStats.getPlanNodeInputPositions() - nodeStats.getPlanNodeOutputPositions()) / nodeStats.getPlanNodeInputPositions();
estimates.getExecutionTime().ifPresent(e -> resourceEstimates.put(EXECUTION_TIME, e.toString())); estimates.getCpuTime().ifPresent(e -> resourceEstimates.put(CPU_TIME, e.toString())); estimates.getPeakMemory().ifPresent(e -> resourceEstimates.put(PEAK_MEMORY, e.toString()));
output.append(format(", Input: %s (%s)", formatPositions(nodeStats.getPlanNodeInputPositions()), nodeStats.getPlanNodeInputDataSize().toString())); nodeStats.getPlanNodeOutputDataSize().toString())); if (printFiltered) { double filtered = 100.0d * (nodeStats.getPlanNodeInputPositions() - nodeStats.getPlanNodeOutputPositions()) / nodeStats.getPlanNodeInputPositions();
HttpResponseFuture<PagesResponse> resultFuture = httpClient.executeAsync( prepareGet() .setHeader(PRESTO_MAX_SIZE, maxResponseSize.toString()) .setUri(uri).build(), new PageResponseHandler(blockEncodingSerde));
HttpResponseFuture<PagesResponse> resultFuture = httpClient.executeAsync( prepareGet() .setHeader(PRESTO_MAX_SIZE, maxResponseSize.toString()) .setUri(uri).build(), new PageResponseHandler());
HttpResponseFuture<PagesResponse> resultFuture = httpClient.executeAsync( prepareGet() .setHeader(PRESTO_MAX_SIZE, maxResponseSize.toString()) .setUri(uri).build(), new PageResponseHandler());
.strictConfig() .setRequiredConfigurationProperty("thrift.server.port", String.valueOf(port)) .setRequiredConfigurationProperty("thrift.server.max-frame-size", MAX_FRAME_SIZE.toString()) .setRequiredConfigurationProperty("thrift.client.connection-pool.enabled", String.valueOf(pooling)) .setRequiredConfigurationProperty("echo.thrift.client.addresses", "localhost:" + port) .setRequiredConfigurationProperty("throwing.thrift.client.min-backoff-delay", "1ms") .setRequiredConfigurationProperty("throwing.thrift.client.backoff-scale-factor", "1.0") .setRequiredConfigurationProperty("throwing.thrift.client.max-frame-size", MAX_FRAME_SIZE.toString()) .doNotInitializeLogging() .initialize();