id
stringlengths
23
26
content
stringlengths
182
2.49k
codereview_java_data_5949
String v1name = name(); Vertex v1 = p.dag.newVertex(v1name, metaSupplierFn.apply(eventTimePolicy)) .localParallelism(localParallelism()); - int localParallelism = localParallelism() != LOCAL_PARALLELISM_USE_DEFAULT - ? localParallelis...
codereview_java_data_5954
import static net.consensys.pantheon.ethereum.p2p.config.DiscoveryConfiguration.MAINNET_BOOTSTRAP_NODES; import static net.consensys.pantheon.ethereum.p2p.config.DiscoveryConfiguration.RINKEBY_BOOTSTRAP_NODES; import java.net.URI; import java.net.URISyntaxException; import java.util.Collection; import java.util.O...
codereview_java_data_5966
OutputFileFactory fileFactory = new OutputFileFactory( spec, format, locations, io.value(), encryptionManager.value(), partitionId, taskId); - final TaskWriter<InternalRow> writer; if (spec.isUnpartitioned()) { writer = new UnpartitionedWriter<>(spec, format, appenderFactory, fileFactory, i...
codereview_java_data_5979
package tech.pegasys.pantheon.consensus.ibftlegacy; import static java.util.Collections.singletonList; -import static org.assertj.core.api.Java6Assertions.assertThat; import tech.pegasys.pantheon.consensus.common.CastVote; -import tech.pegasys.pantheon.consensus.common.ValidatorVotePolarity; import tech.pegasys.pan...
codereview_java_data_5987
return instanceNamePath; } - private String getRootUserName(SiteConfiguration siteConfig, Opts opts) throws IOException { final String keytab = siteConfig.get(Property.GENERAL_KERBEROS_KEYTAB); if (keytab.equals(Property.GENERAL_KERBEROS_KEYTAB.getDefaultValue()) || !siteConfig.getBoolean(Pr...
codereview_java_data_5995
parse(in, false); } - public final void parse(InputStream in, boolean recurse) throws IOException, MessagingException { MimeConfig parserConfig = new MimeConfig(); parserConfig.setMaxHeaderLen(-1); // The default is a mere 10k parserConfig.setMaxLineLen(-1); // The default i...
codereview_java_data_5996
// Default should be FAST for the next release // but we use FULL for the moment as Fast is still in progress SyncMode DEFAULT_SYNC_MODE = SyncMode.FULL; - int DEFAULT_FAST_SYNC_MAX_WAIT_TIME = 0; - int DEFAULT_FAST_SYNC_MIN_PEER_COUNT = 5; int DEFAULT_MAX_PEERS = 25; static Path getDefaultPantheonData...
codereview_java_data_6007
public void tlsTimeoutConfigured_shouldHonor() { Duration connectTimeout = Duration.ofSeconds(1); Duration tlsTimeout = Duration.ofSeconds(3); try (NettyNioAsyncHttpClient client = (NettyNioAsyncHttpClient) NettyNioAsyncHttpClient.builder() ...
codereview_java_data_6008
int ver = props.getDataVersion(); - var createdTs = props.getTimestamp(); byte[] bytes = props.toBytes(); Might be clearer this way. ```suggestion Instant createdTs = props.getTimestamp(); ``` int ver = props.getDataVersion(); + Instant createdTs = props.getTimestamp(); byte[] bytes = props....
codereview_java_data_6021
for (int i = 1; i <= THREAD_COUNT; i++) { final int threadId = i - 1; - Assertions.assertTimeout(TIMEOUT, () -> { try { futures.get(threadId).get(); } catch (final InterruptedException | ExecutionException e)...
codereview_java_data_6022
switch (nodesWhitelistResult.result()) { case SUCCESS: return new JsonRpcSuccessResponse(req.getId(), true); - case ADD_ERROR_EXISTING_ENTRY: return new JsonRpcErrorResponse(req.getId(), JsonRpcError.NODE_WHITELIST_EXISTING_ENTRY); case ERROR_DUPLICATED_ENTRY: ...
codereview_java_data_6030
} } - // determine exact local parallelism of the transforms - for (Transform transform : adjacencyMap.keySet()) { - transform.determineLocalParallelism(ctx); - } - // fuse subsequent map/filter/flatMap transforms into one Map<Transform, List<Trans...
codereview_java_data_6033
break; } } - } catch (MessagingException | IOException e) { /* * Let the user continue composing their message even if we have a problem processing * the source message. Log it as an error, though. this seems like a bad ...
codereview_java_data_6035
mFileRegistry.deleteTopicPartition(topicPartition); mZookeeperConnector.setCommittedOffsetCount(topicPartition, lastSeenOffset + 1); mOffsetTracker.setCommittedOffsetCount(topicPartition, lastSeenOffset + 1); - if (mConfig.getOffsetsStorage().equals("kaf...
codereview_java_data_6037
.getBoolean("com.alibaba.nacos.client.naming.tls.enable"); private static final int MAX_REDIRECTS = 5; - private static final HttpClientFactory HTTP_CLIENT_FACTORY = new NamingHttpClientConfig(); public static String getPrefix() { if (ENABLE_HTTPS) { `NamingHttpClientFactory` will be bet...
codereview_java_data_6038
private static final Place PLACE = new Place("name", Place.Label.AIRPORT, "desc", null, new LatLng(38.6270, -90.1994, 0), null); private static final Place UNKNOWN_PLACE = new Place("name", Place.Label.UNKNOWN, -<<<<<<< HEAD -======= -<<<<<<< 27ac8ae0d72011bc651affecf7b1da2100ec927e - ...
codereview_java_data_6053
import org.junit.jupiter.api.Disabled; import org.kie.kogito.testcontainers.quarkus.InfinispanQuarkusTestResource; -@Disabled("Currently not working in native mode") @NativeImageTest @QuarkusTestResource(InfinispanQuarkusTestResource.Conditional.class) class NativeJavaFNctxIT extends JavaFNctxTest { ```suggestion...
codereview_java_data_6067
Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BiFunction<? super V, ? super V, ? extends V> merge) { - return LinkedHashMap.ofEntries(toMap(keyMapper, valueMapper, merge)); } /** I think we do not maintain key order her...
codereview_java_data_6068
.map(AccountManagerFuture::getResult) .doOnEvent((bundle, throwable) -> { if (bundle.containsKey(AccountManager.KEY_ACCOUNT_NAME)) { - throw new RuntimeException(); } }) .map(bundle -> bu...
codereview_java_data_6069
MetricsConfiguration metricsConfiguration() { final MetricsConfiguration metricsConfiguration = createDefault(); metricsConfiguration.setEnabled(isMetricsEnabled); - metricsConfiguration.setMode(metricsMode); metricsConfiguration.setHost(metricsHost.toString()); metricsConfiguration.setPort(me...
codereview_java_data_6085
} private static File newStagingFile(String ossStagingDirectory) { - Preconditions.checkArgument(ossStagingDirectory != null, "Invalid staging directory: null"); try { File stagingFile = File.createTempFile("oss-file-io-", ".tmp", new File(ossStagingDirectory)); stagingFile.deleteOnExit(); ...
codereview_java_data_6086
int packetType = s.startsWith("M-SEARCH") ? M_SEARCH : s.startsWith("NOTIFY") ? NOTIFY : 0; boolean redundant = address.equals(lastAddress) && packetType == lastPacketType; - if (packetType == M_SEARCH || packetType == NOTIFY) { if (configuration.getIpFiltering().allowed(address)) { ...
codereview_java_data_6093
assertEquals(3, state.getActiveAgents()); } - - @Test - public void testScheduledTasksInfoEndpoint(SingularityClient singularityClient) { - final SingularityScheduledTasksInfo scheduledTasksInfo = singularityClient.getScheduledTasksInfo(); - // TODO: assertion - } } We don't actually have any real un...
codereview_java_data_6096
intersectMap.put(instance.toString(), 1); } } - - instancesMap.put(instance.toString(), instance); } Do not change the Indentation. intersectMap.put(instance.toString(), 1); } } + ...
codereview_java_data_6097
import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; -import org.junit.internal.ExactComparisonCriteria; import static org.apache.hadoop.hive.conf.HiveConf.ConfVars.METASTOREURIS; Is it normal to use this class that's got `internal` in the package name? Do we have to worry about beha...
codereview_java_data_6108
} catch (Exception ex) { if (lock != null || asyncLock != null) { lockWatcher.unableToMonitorLockNode(ex); - log.error("Error resetting watch on ZooLock " + lock + " " + event, ex); } } This is a different log message than before if lock == null; it never logs the as...
codereview_java_data_6111
private void checkExplain(Statement stat, String sql, String expected) throws SQLException { ResultSet rs = stat.executeQuery(sql); - rs.next(); assertEquals(expected, rs.getString(1)); } Do we have any `EXPLAIN ANALYZE` tests? I do not see any. private void checkExplain(Statem...
codereview_java_data_6116
* @param mapper A {@code Function} * @throws NullPointerException if {@code mapper} is null */ - default <W> Map<K, W> mapValues(Function<V, ? extends W> mapper) { - Objects.requireNonNull(mapper, "mapper is null"); - return map((k, v) -> Tuple.of(k, mapper.apply(v))); - } Map...
codereview_java_data_6118
} public String getUploaderRetries() { - return getString("secor.upload.retries", "5"); } public String getUploadManagerClass() { Can you add this property in secor.common.properties with default value. We prefer setting the default value in properties file instead of java class. Is default ...
codereview_java_data_6119
* * @param tag the tag of the associated input stream * @param accumulateFn the {@code accumulate} primitive. It must be - * stateless and {@linkplain Processor#isCooperative() cooperative} * @param <T> the expected type of input item * @return this ...
codereview_java_data_6121
case KeyEvent.KEYCODE_DPAD_LEFT: //Go Back onRewind(); break; case KeyEvent.KEYCODE_DPAD_RIGHT: //Go Forward onFastForward(); break; case KeyEvent.KEYCODE_M: //Mu...
codereview_java_data_6132
} @Test - public void testUseUserAccessTokenFromCTRProps() { ComposedTaskRunnerConfigurationProperties composedTaskRunnerConfigurationProperties = new ComposedTaskRunnerConfigurationProperties(); composedTaskRunnerConfigurationProperties.setUseUserAccessToken(true); We should also have a test that test ...
codereview_java_data_6140
import javax.annotation.Resource; import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; import javax.inject.Named; import javax.mail.Address; import javax.mail.Message; I know it seems silly for such a trivial example, but you might wan...
codereview_java_data_6142
throw new UnsupportedOperationException("Cannot rename Hadoop tables"); } - private static final PathFilter TABLE_FILTER = path -> path.getName().endsWith(TABLE_METADATA_FILE_EXTENSION); - @Override public void close() throws IOException { } Should this class variable move to the top of the class? ...
codereview_java_data_6153
/** * Get the tablet metadata for the given extents. This will find tablets based on end row, so - * its possible the prev rows could differ for the tablets returned. If this matters then it * must be checked. */ Options forTablets(Collection<KeyExtent> extents); "its" -> "it's" ("it is...
codereview_java_data_6154
V value = this.zkValues.get().get(key); if (value == null) { - LOG.debug("ApiCache returned null for {}", key); } return value; for this and the debug statement above, maybe these are more like TRACE level lines? Would get pretty noisy given that we could acall these multiple times a second ...
codereview_java_data_6160
private static final int MESSAGE_TYPE_THUMBNAIL_INCOMING = 6; private static final int MESSAGE_TYPE_DOCUMENT_OUTGOING = 7; private static final int MESSAGE_TYPE_DOCUMENT_INCOMING = 8; - private static final int MESSAGE_TYPE_INCOMING_MULTIPART = 9; private final Set<MessageRecord> batchSelected = Collecti...
codereview_java_data_6162
// rule // #Ceil(MapItem(K1, K2, ..., Kn) Rest:Map) // => - // {(@K1 in_keys(@Rest)) #Equals false} #And ... #And #Ceil(@Kn) - // Note: The {_ in_Keys(_) #Equals false} condition implies // #Ceil(@K1) and #Ceil(@Rest). // [anywhere, simplification] I agree ...
codereview_java_data_6172
* location. * * @param schema iceberg schema used to create the table - * @param spec partition specification - * @param properties properties of the table to be created * @param location a path URI (e.g. hdfs:///warehouse/my_table) * @return newly created table implementation */ Can you no...
codereview_java_data_6173
private final Collection<Path> classesPaths = new ArrayList<>(); private final boolean isJar; - private final String resourcesPath; public static AppPaths fromProjectDir(Path projectDir) { return new AppPaths(Collections.singleton(projectDir), Collections.emptyList(), false, BuildTool.MAVEN);...
codereview_java_data_6175
*/ package tech.pegasys.pantheon.ethereum.eth.sync.fastsync; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.mock; im...
codereview_java_data_6176
DialogUtil.showAlertDialog(getActivity(), getString(R.string.upload_problem_image), errorMessageForResult, - getString(R.string.cancel), getString(R.string.upload), () -> { uploadItem...
codereview_java_data_6179
cleanImmediately = false; { - String storePaths; - if (DefaultMessageStore.this.getMessageStoreConfig().isMultiCommitLogPathEnable()) { - storePaths = DefaultMessageStore.this.getMessageStoreConfig().getCommitLogStorePaths(); - } ...
codereview_java_data_6188
import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; public interface ValidationPolicy { HeaderValidationMode getValidationModeForNextBlock(); Might be worth adding `@FunctionalInterface` here import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; +@FunctionalInterface public interf...
codereview_java_data_6190
if (resumeRes != null && resumeRes.media != null) { resumeRes.media.setThumbready(false); resumeRes.media.setMimeType(HTTPResource.VIDEO_TRANSCODE); - resumeRes.media.setThumbready(false); } /** @SubJunk Why set "thumbready" twice? if (resumeRes != null && resumeRes.media !=...
codereview_java_data_6192
@FunctionalInterface public interface MessageCallback { - MessageCallback NOOP = (final Capability capability, final Message message) -> {}; - void onMessage(final Capability capability, final Message message); } (Discussion) What are those NOOPs Callback used for ? Is it only for testing purpose and are they r...
codereview_java_data_6195
public void onReceive(Context context, Intent intent) { if (NetworkUtils.isInternetConnectionEstablished(NearbyActivity.this)) { refreshView(LOCATION_SIGNIFICANTLY_CHANGED); } else { - Snackbar.make(transparentView , R.string.no_inte...
codereview_java_data_6203
} @Override - void load(List<TabletMetadata> tablets, Files files) throws Exception { byte[] fam = TextUtil.getBytes(DataFileColumnFamily.NAME); for (TabletMetadata tablet : tablets) { scanTime can be negative because `System.currentTimeMillis` are used instead of `System.nanoTime`; that cou...
codereview_java_data_6214
Constraint<Boolean> closedLoopEnabled = constraintChecker.isClosedLoopAllowed(); Double MaxIOBallowed = constraintChecker.getMaxIOBAllowed().value(); String APSmode = sp.getString(R.string.key_aps_mode, "open"); - Double LGSthreshold = 0d; PumpInterface pump = activePlugin.get...
codereview_java_data_6215
out = resizeApplicationBuffer(out);// guarantees enough room for unwrap // Record a hex dump of the buffer, but only when logging on level 'debug'. String hexDump = null; if ( Log.isDebugEnabled() ) { If debug is enabled, hexDump is calculated - but only ever used if the ex...
codereview_java_data_6219
import java.util.List; import java.util.stream.Collectors; -import com.github.javaparser.StaticJavaParser; -import com.github.javaparser.ast.CompilationUnit; -import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; -import com.github.javaparser.ast.stmt.ReturnStmt; import org.drools.compiler.compiler.Deci...
codereview_java_data_6230
@Override public Set<StoredTabletFile> getCandidates(Set<StoredTabletFile> currFiles, CompactionKind kind) { - Set<StoredTabletFile> candidates = new HashSet<>(currFiles); - candidates.removeAll(allCompactingFiles); - return Collections.unmodifiableSet(candidates); } } ```suggestion return Collectio...
codereview_java_data_6231
.isIn("UP", "DOWN", "UNKNOWN"); assertThat(readString(json, "$.zipkin.status")) .isIn("UP", "DOWN", "UNKNOWN"); - assertThat(readString(json, "$.diskSpace.status")) - .isIn("UP", "DOWN", "UNKNOWN"); } @Test public void writesSpans_readMetricsFormat() throws Exception { we don't need th...
codereview_java_data_6233
*/ public static final String ZDELEGATION_TOKEN_KEYS = "/delegation_token_keys"; - /** - * Initial tablet directory name for the default tablet in all tables - */ - public static final String DEFAULT_TABLET_DIR_NAME = "default_tablet"; - public static final String ZTABLE_LOCKS = "/table_locks"; publi...
codereview_java_data_6238
long executionId, SnapshotContext snapshotContext, ConcurrentHashMap<String, File> tempDirectories, - InternalSerializationService serializationService) { this.nodeEngine = (NodeEngineImpl) nodeEngine;...
codereview_java_data_6250
* cluster topology change (triggering data migration), the source may * miss and/or duplicate some entries. * <p> - * Default local parallelism for this processor is 2 (or less if less CPUs - * are available). */ @Nonnull public static <K, V> Source<Map.Entry<K, V>> cache(@Nonn...
codereview_java_data_6259
} /** - * Wither of the 1st element of this tuple. - * - * Note: The wither is NOT named {@code _1} due to possible ambiguity when using method reference (Tuple3::_1). * * @return a copy of this tuple with a new value for the 1st element of this Tuple. */ - public Tuple3<T1, T...
codereview_java_data_6287
startActivityForResult(intent, EDIT_REQUEST_CODE); } // Implements CustomTabActivityHelper.ConnectionCallback @Override public void onCustomTabsConnected() { Unsure what this is for, this request code isn't used. startActivityForResult(intent, EDIT_REQUEST_CODE); } + @OnC...
codereview_java_data_6291
} } } finally { - lockForErrorHandle.lock(); - sendFinishedFlag = true; - sendFinished.signalAll(); - lockForErrorHandle.unlock(); } } try lock finally unlock } } } finally { + ...
codereview_java_data_6295
if (tableRef instanceof SqlBasicCall && ((SqlBasicCall) tableRef).getOperator() instanceof SqlAsOperator) { SqlBasicCall basicCall = (SqlBasicCall) tableRef; - SqlAsOperator operator = (SqlAsOperator) ((SqlBasicCall) tableRef).getOperator(); - operator.unparse( - writ...
codereview_java_data_6299
import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout; import com.wdullaer.materialdatetimepicker.time.TimePickerDialog; -import org.apache.commons.lang3.ObjectUtils; import org.json.JSONException; import org.json.JSONObject; import org.slf4j.Logger; Where is this import needed? import com.wdullaer...
codereview_java_data_6303
return super.dispatchTouchEvent(event); } - private class GestureDetectorListener implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { Log.d(TAG, "GestureDetecorL...
codereview_java_data_6309
private static final String PANTHEON_PREFIX = "pantheon_"; private final Map<MetricCategory, Collection<Collector>> collectors = new ConcurrentHashMap<>(); - private static final Supplier<MetricsSystem> INSTANCE = - Suppliers.memoize(PrometheusMetricsSystem::init); - PrometheusMetricsSystem() {} - publi...
codereview_java_data_6320
* @return an optional containing the instance of the registered factory, or empty if the factory * hasn't been registered. */ - Optional<KeyValueStorageFactory> getByName(final String name); } `final` modifier not needed on an interface * @return an optional containing the instance of the regist...
codereview_java_data_6324
import com.google.inject.Scopes; import com.google.inject.Singleton; import com.google.inject.name.Named; -import com.hubspot.singularity.SingularityTaskRequest; public class SingularityMesosModule extends AbstractModule { Are these unused imports? import com.google.inject.Scopes; import com.google.inject.Singl...
codereview_java_data_6326
} } - private void initializeRingtoneSummary(AdvancedRingtonePreference pref) { RingtoneSummaryListener listener = (RingtoneSummaryListener) pref.getOnPreferenceChangeListener(); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity()); also i might b...
codereview_java_data_6332
try { listTable(Ample.DataLevel.ROOT, context); } catch (UnsupportedOperationException ex) { - // print nothing if no table name exists } System.out.println(); listTable(Ample.DataLevel.METADATA, context); Why are you suppressing the error here? You could just let the error be thro...
codereview_java_data_6334
TSERV_SUMMARY_RETRIEVAL_THREADS("tserver.summary.retrieval.threads", "10", PropertyType.COUNT, "The number of threads on each tablet server available to retrieve" + " summary data, that is not currently in cache, from RFiles."), - TSERV_LASTLOCATION_UPDATE_TIME("tserver.lastlocation.update.time", ...
codereview_java_data_6349
/** * @return {@code true} if we should show remaining time or the duration */ - public static boolean getShowRemainTimeSetting() { return prefs.getBoolean(PREF_SHOW_TIME_LEFT, false); } UserPreferences currently does not send events. Could you please send it in the preferences fragme...
codereview_java_data_6351
/** * ConfigInfo. * - * @author boyan - * @date 2010-5-4 */ public class ConfigInfo { Is this file copied from others? /** * ConfigInfo. * + * @author Nacos */ public class ConfigInfo {
codereview_java_data_6356
sb.append(", TVEPISODENUMBER VARCHAR2(").append(SIZE_TVEPISODENUMBER).append(')'); sb.append(", TVEPISODENAME VARCHAR2(").append(SIZE_MAX).append(')'); sb.append(", ISTVEPISODE BOOLEAN"); - sb.append(", EXTRAINFORMATION VARCHAR2(").append(SIZE_MAX).append("))"); ...
codereview_java_data_6366
import software.amazon.awssdk.http.async.AsyncExecuteRequest; import software.amazon.awssdk.http.async.SdkAsyncHttpClient; import software.amazon.awssdk.regions.Region; -import software.amazon.awssdk.transfer.s3.S3CrtResponseHandlerAdapter; import software.amazon.awssdk.utils.AttributeMap; import software.amazon.a...
codereview_java_data_6370
public static final AwsAdvancedClientOption<Boolean> ENABLE_DEFAULT_REGION_DETECTION = new AwsAdvancedClientOption<>(Boolean.class); - public static final AwsAdvancedClientOption<String> SIGNING_NAME = new AwsAdvancedClientOption<>(String.class); protected AwsAdvancedClientOption(Class<T> valueCla...
codereview_java_data_6373
} if (requestsCache.isEnabled()) { - List<SingularityRequestWithState> requests = requestsCache.get("all"); - if (requests != null) { return requests; } } I wonder if we should just not use the web cache here if this is the case. Seems overkill to have the leaderCache -> web ca...
codereview_java_data_6386
this.id = id; } else { // otherwise assign the remote host as id. - this.id = id = "http://" + remoteHost.getHost() + ":" + remoteHost.getPort(); } maxConcurrentSession = getConfigInteger(RegistrationRequest.MAX_SESSION); any reason you're assigning to the local variable 'id' too? ...
codereview_java_data_6391
} else { editor.putInt(Prefs.UPLOADS_SHOWING, value); editor.putBoolean(Prefs.IS_CONTRIBUTION_COUNT_CHANGED,true); - uploadLimit.setSummary(newValue.toString()); } editor.apply(); return true; While user sets upload li...
codereview_java_data_6406
import graphql.schema.DataFetcher; import graphql.schema.DataFetchingEnvironment; -import org.openqa.selenium.SessionNotCreatedException; import org.openqa.selenium.grid.distributor.Distributor; -import org.openqa.selenium.grid.sessionmap.SessionMap; import org.openqa.selenium.internal.Require; import java.net.URI...
codereview_java_data_6418
@ApiOperation("Retrieve the list of logs stored in S3 for a specific task.") public List<SingularityS3Log> getS3LogsForTask( @ApiParam("The task ID to search for") @PathParam("taskId") String taskId, - @ApiParam("Start timestamp (millis, 13 digit)") @QueryParam("start") long start, - @ApiParam("E...
codereview_java_data_6429
} @Override - public void peerAdded(final PeerConnection newConnection) { final Address peerAddress = newConnection.getPeer().getAddress(); peerConnections.put(peerAddress, newConnection); } @Override - public void peerRemoved(final PeerConnection removedConnection) { final Address peerAddr...
codereview_java_data_6430
Field[] fields = proxyIn.getDeclaredFields(); for (Field field : fields) { int modifiers = field.getModifiers(); - if (Modifier.isFinal(modifiers) || Modifier.isStatic(modifiers)) continue; Object value = decorator.decorate(page.getClass().getClassLoader(), field); if (value...
codereview_java_data_6434
domainTemplate.setTemplateNames(domainTemplateListMap.get(domainName)); //Passing null context since it is an internal call during app start up //executePutDomainTemplate can bulk apply templates given a domain hence sending domainName and templatelist - this.executePut...
codereview_java_data_6439
// Overrides the table's read.split.open-file-cost public static final String FILE_OPEN_COST = "file-open-cost"; } There are also more read options. Why not include all of them? // Overrides the table's read.split.open-file-cost public static final String FILE_OPEN_COST = "file-open-cost"; + + // Overri...
codereview_java_data_6447
static abstract class Factory extends DeduplicatingVoidCallFactory<Input> { final Session session; - // Shared across all threads as updates can come from any thread. - final Map<Entry<String, Long>, Pair> sharedState; final String table; final int bucketCount; final PreparedStatement prepa...
codereview_java_data_6450
List<String> types= new ArrayList<>(); types.add(Proxy.Type.DIRECT.name()); types.add(Proxy.Type.HTTP.name()); - - if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){ types.add(Proxy.Type.SOCKS.name()); } - ArrayAdapter<String> adapter = new A...
codereview_java_data_6464
protected static final String ICEBERG_METADATA_FOLDER = "metadata"; protected static final List<String> EXCLUDED_PROPERTIES = ImmutableList.of("path", "transient_lastDdlTime", "serialization.format"); - private AtomicInteger counter = new AtomicInteger(); private final SparkSession spark; nit: This se...
codereview_java_data_6465
return nameAllocator; } - public synchronized CryptoService getCryptoService() { if (cryptoService == null) { throw new CryptoService.CryptoException("Crypto service not initialized."); } not sure if this needs to be synchronized return nameAllocator; } + public CryptoService getCry...
codereview_java_data_6483
OutputFile encryptingOutputFile(); /** - * Metadata about the encryption keys and other crypto parameters used to encrypt the associated * {@link #encryptingOutputFile()}. */ EncryptionKeyMetadata keyMetadata(); - - /** - * Parameters of native encryption (if used for this file) - */ - default ...
codereview_java_data_6484
sendResponse(null); } } else { - LogUtil.CLIENT_LOG.warn("client subsciber's relations delete fail."); } } catch (Throwable t) { LogUti...
codereview_java_data_6485
@Override public void execute(final String[] args) throws Exception { - System.out.println("WARNING: External compaction processes are experimental"); CompactionCoordinator.main(args); } System.err or using the logger might be better for these. @Override public void execute(final String[] args)...
codereview_java_data_6487
public static final String STRING = "STRING"; public static final String SUBSTITUTION = "SUBSTITUTION"; public static final String UNIFICATION = "UNIFICATION"; - public static final String JSON = "JSON"; - public static final Set<String> namespaces = Collections.unmodifiableSet(new HashSet<>(Arrays...
codereview_java_data_6495
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Arrays; -import java.util.List; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; Would a Map<Integer,StorageProviderFunction> work better in the event that version numbers are no...
codereview_java_data_6500
@Override public NacosAsyncRestTemplate createNacosAsyncRestTemplate() { final HttpClientConfig originalRequestConfig = buildHttpClientConfig(); - final RequestConfig requestConfig = getRequestConfig(); - final IOReactorConfig ioReactorConfig = getIoReactorConfig(); return new ...
codereview_java_data_6503
fileStatuses = fs.listStatus(metadataLocation, path -> path.getName().endsWith(TableMetadataParser.fileSuffix())); } catch (IOException e) { - LOG.warn("Unable to list table metadata files", e); - return ImmutableList.of(); } return Stream.of(fileStatuses) .map(FileStatus...
codereview_java_data_6509
.deleteFile(FILE_DAY_2) .addFile(FILE_DAY_2_MODIFIED) .validateFromSnapshot(baseSnapshot.snapshotId()) - .validateNoConflictingAppends(EXPRESSION_DAY_2) .commit(); validateTableFiles(table, FILE_DAY_1, FILE_DAY_2_MODIFIED); I think `validateNoConflictingAppends` has been...
codereview_java_data_6510
+ expr.getExpressionString() + "'", e); } } - - public static Mono<Boolean> evaluateAsMonoBoolean(Expression expr, EvaluationContext ctx) { - try { - return (Mono<Boolean>) expr.getValue(ctx, Mono.class); - } - catch (EvaluationException e) { - throw new IllegalArgumentException("Failed to evaluate ex...
codereview_java_data_6514
@Override public synchronized void provideDynamicMetrics(MetricDescriptor descriptor, MetricsCollectionContext context) { - if (bytes > 0) { - context.collect(descriptor, SNAPSHOT_BYTES, ProbeLevel.INFO, ProbeUnit.COUNT, bytes); - context.collect(descriptor, SN...
codereview_java_data_6515
import org.apache.accumulo.shell.Shell; import org.apache.accumulo.shell.Shell.Command; import org.apache.commons.cli.CommandLine; public class ImportDirectoryCommand extends Command { I think `OptUtil.getTableOpt()` is supposed to do most of this logic. As in: ```java String tableName = OptUtil.getTableOpt(cl, sh...
codereview_java_data_6521
* @return <tt>true</tt>, if one address belongs to a contact. * <tt>false</tt>, otherwise. */ - public boolean containsContact(final Address[] addresses) { if (addresses == null) { return false; } This does almost exactly the same as `isInContacts`, I would s...
codereview_java_data_6522
throw new UnknownFormatException("Unable to read image format", e); } - if (inputResult.bufferedImage == null) { // ImageIO doesn't support the image format throw new UnknownFormatException("Failed to transform image because the source format is unknown"); } Why don't we need to check for that? thr...
codereview_java_data_6525
} @Test - public void setNodeWhiteListPassingNull() { final PermissioningConfiguration configuration = PermissioningConfiguration.createDefault(); configuration.setNodeWhitelist(null); assertThat(configuration.getNodeWhitelist()).isEmpty(); Should we be more descriptive in the test name? } ...