id stringlengths 23 26 | content stringlengths 182 2.49k |
|---|---|
codereview_java_data_10605 | : config.getProfile(profileName);
}
if (this.statement.getNode() != null) {
- this.queryPlan = new ConcurrentLinkedQueue<Node>();
- this.queryPlan.add(this.statement.getNode());
} else {
this.queryPlan =
Since JAVA-1883 there is a dedicated queue implementation for query ... |
codereview_java_data_10609 | * @since 5.5
*/
public void setCookieMaxAge(int cookieMaxAge) {
- Assert.isTrue(cookieMaxAge != 0, "cookieMaxAge is not zero");
this.cookieMaxAge = cookieMaxAge;
}
Can you please change this to be cookieMaxAge cannot be zero? As it is, the error the user will see if it is `0` would state it is not zero w... |
codereview_java_data_10617 | @Override
public double computeFor(ASTMethodOrConstructorDeclaration node, MetricVersion version) {
- JavaParserVisitor visitor = (CycloVersion.IGNORE_BOOLEAN_PATHS.equals(version))
? new CycloPathUnawareOperationVisitor()
... |
codereview_java_data_10623 | jet.newJob(p).join();
- assertTrueEventually(() -> {
- try (S3Client client = clientSupplier().get()) {
long lineCount = client
.listObjects(req -> req.bucket(bucketName).prefix(prefix))
.contents()
do we need to recreate the... |
codereview_java_data_10625 | });
}
- private void setWriteMode(String tabName, String mode) {
sql("ALTER TABLE %s SET TBLPROPERTIES('%s' '%s')", tabName, TableProperties.WRITE_DISTRIBUTION_MODE, mode);
}
I think this should be `setDistributionMode` instead because `setWriteMode` sounds more general, like "copy-on-write" or "merge... |
codereview_java_data_10627 | );
}
- @GET
- @Path("/agent/max-decommissioning-count")
- @Operation(summary = "Retrieve the max decommissioning agent count from configuration")
- public int getMaxDecommissioningAgent() {
- return super.getMaxDecommissioningAgents();
- }
-
@POST
@Path("/agent/{agentId}/freeze")
@Operation(sum... |
codereview_java_data_10640 | requestResource.postRequest(request.toBuilder().setInstances(Optional.of(2)).build(), singularityUser);
initFirstDeploy();
- configuration.setDeltaAfterWhichTasksAreLateMillis(TimeUnit.MILLISECONDS.toMillis(10));
requestResource.scheduleImmediately(
singularityUser,
shouldn't need MILLISECON... |
codereview_java_data_10641 | final Optional<Double> minimumPriorityLevel = getMinimumPriorityLevel();
final Map<Boolean, List<SingularityPendingTaskId>> lateTasksPartitionedByOnDemand = scheduledTasksInfo.getLateTasks().stream()
- .collect(Collectors.partitioningBy(lateTask -> requestManager.getRequest(lateTask.getRequestId()).get... |
codereview_java_data_10645 | import tech.pegasys.pantheon.util.ExceptionUtils;
import java.time.Duration;
-import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.apache.logging.log4j.LogManager;
Does it make sense to use the more generic `Collection` here?
import tech.pegasys.pantheon.util.ExceptionUtils;
import j... |
codereview_java_data_10646 | assertEquals("00000000-0000-4000-8000-000000000000", min.getString());
// Test conversion from ValueJavaObject to ValueUuid
- ValueJavaObject valObj = ValueJavaObject.getNoCopy(UUID.fromString("12345678-1234-4321-8765-123456789012"), null, null);
Value valUUID = valObj.convertTo(Value.... |
codereview_java_data_10649 | private static final Pattern PTN_INTERVAL = Pattern.compile(
"interval" + SM + "(floor\\()([\\d\\.]+)(\\))" + SM + "(second|minute|hour|day|month|year)",
Pattern.CASE_INSENSITIVE);
- private static final Pattern PTN_HAVING_ESCAPE_FUNCTION = Pattern.compile("\\{fn" + SM + "(EXTRACT\\(.*... |
codereview_java_data_10656 | if (!TextSecurePreferences.isNewContactsNotificationEnabled(context)) return;
for (String newUser : newUsers) {
- String e164number = "";
- try {
- e164number = Util.canonicalizeNumber(context, newUser);
- } catch (InvalidNumberException e) {
- Log.w(TAG, e);
- }
-
- if ... |
codereview_java_data_10661 | double doublePrecisionDelta = 0.0001;
if (index == 0 || (Math.abs(weights[index - 1] - 1) < doublePrecisionDelta)) {
- throw new IllegalStateException(
- "Cumulative Weight caculate wrong , the sum of probabilities does not equals 1.");
}
... |
codereview_java_data_10671 | Matcher m = re.matcher(page);
while (m.find()) {
LOGGER.debug("found subtitle " + m.group(2) + " name " + m.group(1) + " zip " + m.group(3));
- res.put(m.group(2) + ":" + FileUtil.getFileNameWithoutExtension(m.group(1)), m.group(3));
if (res.size() > PMS.getConfiguration().openSubsLimit()) {
// lim... |
codereview_java_data_10673 | long tmpTimeStamp = mappedFile.getStoreTimestamp();
int offset = mappedFile.flush(flushLeastPages);
if (mappedFile.getflushError()) {
- this.flushError =true;
}
long where = mappedFile.getFileFromOffset() + offset;
result = where... |
codereview_java_data_10675 | }
}
- @SuppressWarnings("unchecked")
@Override
public List<ReadOnlyRepo<T>> getStack(long tid) {
String txpath = getTXPath(tid);
Empty list instead of null?
}
}
@Override
public List<ReadOnlyRepo<T>> getStack(long tid) {
String txpath = getTXPath(tid); |
codereview_java_data_10677 | *
* The lists are encoded with the elements separated by null (0x0) bytes, which null bytes appearing
* in the elements escaped as two 0x1 bytes, and 0x1 bytes appearing in the elements escaped as 0x1
- * and 0x2 bytes. The list is terminated with a final delimiter, with no bytes following it.
*
* @since 2.0.... |
codereview_java_data_10687 | }
@Bean
- @ConditionalOnMissingBean(RedisConnectionFactory.class)
RedisConnectionFactory redisConnectionFactory(Cloud cloud) {
return cloud.getSingletonServiceConnector(RedisConnectionFactory.class, null);
}
since this is now using `@AutoConfigureBefore`, does it still need the `@ConditionalOnMissingB... |
codereview_java_data_10693 | package org.apache.calcite.test;
-import org.apache.calcite.jdbc.JavaTypeFactoryImpl;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.logical.LogicalFilter;
import org.apache.calcite.rel.logical.LogicalProject;
-import org.apache.calcite.rel.type.RelDataType;
-import org.apache.calcite.rel.type... |
codereview_java_data_10700 | * to 1.4.196 because 1.4.197 broke audio metadata being
* inserted/updated
* - 23: Store aspect ratios as strings again
- * - 24: added MusicBrainzID to audio tracks
*/
- private final int latestVersion = 24;
// Database column sizes
private final int SIZE_CODECV = 32;
Do you think it woul... |
codereview_java_data_10703 | snapshotContext = new SnapshotContext(nodeEngine.getLogger(SnapshotContext.class), jobNameAndExecutionId(),
plan.lastSnapshotId(), jobConfig.getProcessingGuarantee());
- serializationService = new JetSerializationService(
- instantiateSerializers(currentThread().getContex... |
codereview_java_data_10705 | this.ldif = ldif;
}
- private void checkFilePath(String ldif) {
- if (!StringUtils.hasText(ldif)) {
- throw new IllegalArgumentException("Unable to load LDIF " + ldif);
- }
- }
public int getPort() {
return this.port;
Setting the LDIF is optional, so we shouldn't throw an exception, instead we should jus... |
codereview_java_data_10715 | @Override
public boolean equals(Object other) {
if (other instanceof ImapFolder) {
-
- return other.hashCode() == hashCode() ;
}
return super.equals(other);
This is wrong. We still need to use the folder name for equality checks.
@Override
public boolean equal... |
codereview_java_data_10722 | @Override
public void connectionClose(final BackendConnection conn, final String reason) {
final XACommitNodesHandler thisHandler = this;
- Thread newThreadFor = new Thread(new Runnable() {
@Override
public void run() {
thisHandler.connectionCloseLoca... |
codereview_java_data_10731 | TabletIteratorEnvironment iterEnv;
if (env.getIteratorScope() == IteratorScope.majc)
iterEnv = new TabletIteratorEnvironment(IteratorScope.majc, !propogateDeletes, acuTableConf,
- MajorCompactionReason.values()[reason]);
else if (env.getIteratorScope() == IteratorScope.minc)
- ... |
codereview_java_data_10735 | public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
- navigateUp = true;
- prepareToFinish();
break;
case R.id.send:
checkToSendMessage();
These two always go to... |
codereview_java_data_10737 | }
validateIdentityLinkArguments(identityId, type);
if (restApiInterceptor != null) {
- restApiInterceptor.deleteProcessInstanceIdentityLink(processInstance, identityId, type);
}
- getIdentityLink(identityId, type, processInstance.getId());
-
runtimeService.... |
codereview_java_data_10740 | if (loopIfNoConnection) {
try {
Thread.sleep(retryWait);
- } catch (Exception e) {
- // Ignored, the thread was interrupted while waiting, so no need to log either
}
}
} while (loopIfNoConnection)... |
codereview_java_data_10742 | mSendProductDao = Utils.getAppDaoSession(this).getSendProductDao();
mSharedPref = getApplicationContext().getSharedPreferences("prefs", 0);
- boolean messageDismissed = mSharedPref.getBoolean("is_message_dismissed", false);
if (messageDismissed) {
mContainerView.setVisibil... |
codereview_java_data_10754 | if (tranType == MessageSysFlag.TRANSACTION_NOT_TYPE
|| tranType == MessageSysFlag.TRANSACTION_COMMIT_TYPE) {
// Delay Delivery
- if (msg.getDelayTimeLevel() > 0 && !isDLQTopic(msg.getTopic())) {
if (msg.getDelayTimeLevel() > this.defaultMessageStore.get... |
codereview_java_data_10762 | @JsonProperty("gcsCredentials") Map<String, Object> gcsCredentials,
@JsonProperty("gcsStorageClass") Optional<String> gcsStorageClass,
@JsonProperty("encryptionKey") Optional<String> encryptionKey,
- @JsonProperty(... |
codereview_java_data_10768 | /**
* Initialize all views.
*/
private void initViews() {
Timber.d("initViews called");
View elements that are part of `NearbyFragment` should ideally be not accessed directly in `NearbyMapFragment`. Either try to fix it or atleast add a `TODO` to fix it in the future.
/**
* ... |
codereview_java_data_10769 | }
// FIXME: Make sure that the content provider is up
// This is the wrong place for it, but bleh - better than not having it turned on by default for people who don't go throughl ogin
- ContentResolver.setSyncAutomatically(app.getCurrentAccount(), ModificationsContentProvider.AUTHORIT... |
codereview_java_data_10773 | private void addMutations(MutationSet mutationsToSend) {
Map<String,TabletServerMutations<Mutation>> binnedMutations = new HashMap<>();
- Span span =
- TraceUtil.getTracer().spanBuilder("TabletServerBatchWriter::binMutations").startSpan();
try (Scope scope = span.makeCurrent()) {
... |
codereview_java_data_10774 | import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.util.*;
import java.util.stream.Collectors;
import org.infinispan.protostream.FileDescriptorSource;
@uteegozi we should probably avoid using import *
import java.io.File;
import java.io.IOException;
import java.io.InputS... |
codereview_java_data_10780 | }
validateIdentityLinkArguments(family, identityId, type);
- if (restApiInterceptor != null) {
- restApiInterceptor.accessTaskIdentityLinks(task);
- }
IdentityLink link = getIdentityLink(family, identityId, type, task.getId());
return restResponseFactory.crea... |
codereview_java_data_10786 | private final Duration maxBatchOpenInMs;
public SqsBatchConfiguration(BatchOverrideConfiguration overrideConfiguration) {
- Optional<BatchOverrideConfiguration> configuration = Optional.ofNullable(overrideConfiguration);
- this.maxBatchItems = configuration.flatMap(BatchOverrideConfiguration::ma... |
codereview_java_data_10795 | public static boolean isPrime(long val) {
return API.Match(val).of(
Case($(2L), true),
- Case($(n -> n > 2), n -> !primes().takeWhile(d -> d <= Math.sqrt(n)).exists(d -> n % d == 0)),
Case($(), false)
);
}
- isn't `n` always bigger than 2 her... |
codereview_java_data_10798 | public static void ingest(AccumuloClient c, Opts opts, BatchWriterOpts batchWriterOpts)
throws MutationsRejectedException, IOException, AccumuloException, AccumuloSecurityException,
TableNotFoundException, TableExistsException {
- ingest(c, FileSystem.get(new Configuration()), opts, batchWriterOpts)... |
codereview_java_data_10802 | * v5.
*/
void switchToV5Framing() {
// We want to do this on the event loop, to make sure it doesn't race with incoming requests
assert channel.eventLoop().inEventLoop();
Why remove this?
* v5.
*/
void switchToV5Framing() {
+ assert factory.protocolVersion.compareTo(ProtocolVersion.... |
codereview_java_data_10804 | }
if(mState != null && product.getIngredientsText() != null) {
- //TODO The API doesn't return ingredients text with the _ token. the replace method could be removed
String txtIngredients = product.getIngredientsText().replace("_","").trim();
if(!txtIngredients.isE... |
codereview_java_data_10805 | unique.setTableName(tableName);
command.addConstraintCommand(unique);
}
-
- NULL_CONSTRAINT nullConstraint = parseNotNullConstraint();
- switch (nullConstraint) {
- cas... |
codereview_java_data_10814 | public interface LogCaptor extends SdkAutoCloseable {
List<LogEvent> loggedEvents();
void clear();
Do we have unit tests that cover this class?
public interface LogCaptor extends SdkAutoCloseable {
+ static LogCaptor create() {
+ return new DefaultLogCaptor();
+ }
+
+ static LogCaptor crea... |
codereview_java_data_10818 | initDrawer();
setTitle(getString(R.string.title_activity_contributions));
- QuizChecker quizChecker = new QuizChecker(this,
- sessionManager.getCurrentAccount().name,
- mediaWikiApi);
if(!BuildConfig.FLAVOR.equalsIgnoreCase("beta")){
setUpload... |
codereview_java_data_10822 | private DefaultBatchManagerTestBatchManager(DefaultBuilder builder) {
this.client = builder.client;
ScheduledExecutorService scheduledExecutor = builder.scheduledExecutor;
- ThreadFactory threadFactory = new ThreadFactoryBuilder().threadNamePrefix(
- "software.amazon.awssdk.serv... |
codereview_java_data_10823 | fullBlockchain = BlockchainSetupUtil.forTesting().importAllBlocks();
}
- @SuppressWarnings("unchecked")
@Before
public void setup() {
blockchainUtil = BlockchainSetupUtil.forTesting();
I really don't like disabling the unchecked warning. Consider using <?> when you access no templated methods.
... |
codereview_java_data_10828 | package org.apache.iceberg;
-import com.google.common.collect.Sets;
import java.util.Date;
import java.util.List;
-import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
nit: Empty line.
package org.apache.iceberg;
import java.util.... |
codereview_java_data_10830 | final MockEthTask task1 = new MockEthTask(1);
final MockEthTask task2 = new MockEthTask();
- ethScheduler.scheduleTxWorkerTask(BoundedTimedTask.fromRunnable(task1::executeTask));
- ethScheduler.scheduleTxWorkerTask(BoundedTimedTask.fromRunnable(task2::executeTask));
ethScheduler.stop();
assert... |
codereview_java_data_10846 | };
} else if (map instanceof ClientMapProxy) {
// TODO: add strategy/unify after https://github.com/hazelcast/hazelcast/issues/13950 is fixed
- addToBuffer = entry -> {
- Data key = serializationService.toData(key(entry));
- Data value = serial... |
codereview_java_data_10848 | public synchronized String getPropertiesPath() {
if (propsPath == null) {
- URL propLocation = SiteConfiguration.getAccumuloPropsLocation();
- propsPath = propLocation.getFile();
}
return propsPath;
}
Could this just be one line?
public synchronized String getPropertiesPath() {
... |
codereview_java_data_10862 | }
}
- protected SingularityDeleteResult delete(String path, ZkCache<?> cache) {
- cache.delete(path);
- return delete(path);
- }
-
protected SingularityDeleteResult delete(String path) {
final long start = System.currentTimeMillis();
Won't other nodes still have this data cached?
}
}
... |
codereview_java_data_10863 | if (tablet.needsSplit()) {
tablet.getTabletServer().executeSplit(tablet);
}
- } catch (Exception t) {
- log.error("Unknown error during minor compaction for extent: " + tablet.getExtent(), t);
- throw new RuntimeException(t);
} finally {
tablet.minorCompactionComplete();
... |
codereview_java_data_10867 | }
// get Iceberg props that have been removed
- List<String> removedProps = Collections.emptyList();
if (base != null) {
removedProps = base.properties().keySet().stream()
.filter(key -> !metadata.properties().containsKey(key))
- .collect(Collectors.toList());
... |
codereview_java_data_10869 | @EnableConfigurationProperties(SelfTracingProperties.class)
@ConditionalOnSelfTracing
public class TracingConfiguration {
- static volatile Thread reporterThread;
-
- public static boolean isSpanReporterThread() {
- return Thread.currentThread() == reporterThread;
- }
-
/** Configuration for how to buffer s... |
codereview_java_data_10873 | import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
Put in a 2 second delay because the reloading thread ke... |
codereview_java_data_10874 | */
public abstract class SingleKeyAction extends KeysRelatedAction {
protected final Keys key;
- private static final Keys[] MODIFIER_KEYS = {Keys.SHIFT, Keys.CONTROL, Keys.ALT, Keys.META, Keys.COMMAND, Keys.LEFT_ALT, Keys.LEFT_CONTROL, Keys.LEFT_SHIFT};
protected SingleKeyAction(Keyboard keyboard, Mouse mous... |
codereview_java_data_10877 | import static tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNodeConfig.pantheonCliqueMinerNode;
import tech.pegasys.pantheon.tests.acceptance.dsl.AcceptanceTestBase;
-import tech.pegasys.pantheon.tests.acceptance.dsl.clique.CliqueConditions;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNo... |
codereview_java_data_10879 | @Override
public SnapshotTable.Result execute() {
- JobGroupInfo info = newJobGroupInfo("SNAPSHOT-TABLE",
- String.format("Snapshotting table %s as %s", sourceTableIdent().toString(), destTableIdent.toString()));
return withJobGroupInfo(info, this::doExecute);
}
Do we need to call toString expl... |
codereview_java_data_10883 | public Writer(BlockFileWriter bfw, int blockSize) throws IOException {
this(bfw, blockSize, (int) DefaultConfiguration.getInstance().getAsBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX), null, null);
- long indexBlockSize = DefaultConfiguration.getInstance().getAsBytes(Property.TABLE_FILE_COMPRE... |
codereview_java_data_10898 | AppDefinition revisedDefinition = mergeAndExpandAppProperties(currentApp, metadataResource, appDeployTimeProperties);
AppDeploymentRequest request = new AppDeploymentRequest(revisedDefinition, appResource, deployerDeploymentProperties);
try {
- String loggingString = String.format("Deploying the app '%s.... |
codereview_java_data_10902 | import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.Callable;
-import java.util.concurrent.Executors;
import org.apache.accumulo.master.TimeoutTaskExecutor.SuccessCallback;
import org.apache.accumulo.master.TimeoutTaskExecutor.TimeoutCallback;
try changing this code to ```java pub... |
codereview_java_data_10907 | justification = "all updates to ongoingSnapshotId are synchronized")
public void startNewSnapshot(String exportedSnapshotMapName) {
ongoingSnapshotId++;
- ongoingSnapshotStartTime = System.nanoTime();
this.exportedSnapshotMapName = exportedSnapshotMapName;
}
is this valu... |
codereview_java_data_10912 | import tech.pegasys.pantheon.tests.acceptance.dsl.node.Cluster;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
public class JsonRpc {
private final Cluster nodes;
I'll review this properly tomorrow but, why the @Immutable annotati... |
codereview_java_data_10917 | "difficulty_total",
"Total difficulty of the chainhead",
() ->
- new BigInteger(this.getChainHead().getTotalDifficulty().getBytes().getArrayUnsafe())
.doubleValue());
}
There's a utility for transforming `BytesValues` to `BigInteger`'s: `BytesValues.asUnsignedB... |
codereview_java_data_10920 | try {
if (f.getType() == GeneratedFile.Type.RESOURCE) {
writeGeneratedFile(f, resourcePath);
- } else if (isCustomizable(f)) {
writeGeneratedFile(f, restResourcePath);
} else {
writeGeneratedFile... |
codereview_java_data_10934 | }
public int getRequestTimeoutMillis() {
- return ibftConfigRoot.getInteger("requesttimeoutseconds", DEFAULT_ROUND_EXPIRY_MILLISECONDS);
}
}
shouldn't this be requesttimeoutmilliseconds the default value and method suggests it is meant to represents millis
}
public int getRequestTimeoutMillis() {
+... |
codereview_java_data_10940 | @JsonProperty
@NotNull
- private boolean switchUser = true;
public List<SingularityExecutorShellCommandOptionDescriptor> getOptions() {
return options;
can we make this more descriptive? (i.e. `runAsTaskUser`)
@JsonProperty
@NotNull
+ private boolean runAsTaskUser = true;
public List<Singular... |
codereview_java_data_10945 | CompactableImpl.CompactionInfo cInfo, CompactionEnv cenv,
Map<StoredTabletFile,DataFileValue> compactFiles, TabletFile tmpFileName)
throws IOException, CompactionCanceledException {
- boolean propagateDeletes = cInfo.propagateDeletes;
AccumuloConfiguration compactionConfig = getCompactionCo... |
codereview_java_data_10946 | try {
double progress = entries.getValue().getBytesCopied() / walBlockSize;
// to be sure progress does not exceed 100%
- status.progress = Math.max(progress, 99.0);
} catch (IOException ex) {
log.warn("Error getting bytes read");
}
I think this keep... |
codereview_java_data_10954 | ).collect(joining("\n")));
}
- private static boolean isSplitLocalForMember(InputSplit split, Address memberAddr) {
try {
final InetAddress inetAddr = memberAddr.getInetAddress();
return Arrays.stream(split.getLocations())
We should lo... |
codereview_java_data_10956 | @Experimental
public final class ASTGuardedPattern extends AbstractJavaNode implements ASTPattern {
ASTGuardedPattern(int id) {
super(id);
}
```suggestion * GuardedPattern ::= {@linkplain ASTPattern Pattern} "&&" {@linkplain ASTConditionalAndExpression ConditionalAndExpression} ```
@Expe... |
codereview_java_data_10964 | }
/**
- * Upgrades the settings from version 75 to 76.
*
* <p>
- * Change default value of {@code registeredNameColor} from {@code 0xFF00008F} to {@code -638932 )} (#F6402C).
* </p>
*/
private static class SettingsUpgraderV79 implements SettingsUpgrader {
The actual color... |
codereview_java_data_10965 | }
}
- @Override
- public void onAttach(Context context) {
- super.onAttach(context);
- }
-
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
Unnecessary empty method.
}
}
@Override
public boolean onOptio... |
codereview_java_data_10970 | bolusMessage.setDuration(0);
bolusMessage.setExtendedAmount(0);
bolusMessage.setImmediateAmount(insulin);
- bolusMessage.setVibration(sp.getBoolean("insight_disable_vibration",false));
bolusID = connectionService.requ... |
codereview_java_data_10972 | public static final String CATALOG = "iceberg.mr.catalog";
public static final String HADOOP_CATALOG_WAREHOUSE_LOCATION = "iceberg.mr.catalog.hadoop.warehouse.location";
public static final String CATALOG_LOADER_CLASS = "iceberg.mr.catalog.loader.class";
- public static final String COLUMN_PROJECTIONS = "iceb... |
codereview_java_data_10975 | return;
}
// Check if the subscriber is an anonymous user
- if (!UserManager.getInstance().isRegisteredUser(subscriberJID) && !isComponent(subscriberJID)) {
// Anonymous users cannot subscribe to the node. Return forbidden error
sendErrorPacket(iq, PacketE... |
codereview_java_data_10976 | // Http code 200
if (result.ok()) {
- return JSONUtils.deserializeObject(result.getData(), new TypeReference<SampleResult>() {
- });
} else {
LogUtil.DEFAULT_LOG.info("Can not get clientInfo from {} with {}", i... |
codereview_java_data_10977 | Timestamp currentTimestamp = Timestamp.from(Instant.ofEpochMilli(System.currentTimeMillis()));
List<Object[]> output = sql(
- "CALL %s.system.expire_snapshots('%s', '%s', TIMESTAMP '%s', 1)",
- catalogName, tableIdent.namespace(), tableIdent.name(), currentTimestamp);
assertEquals("Procedur... |
codereview_java_data_10994 | protected static class LocalConfig {
@Bean
- public ModuleDeployer longRunningModuleDeployer(ModuleLauncher moduleLauncher) {
return new LocalModuleDeployer(moduleLauncher);
}
Since we are creating two same beans with different names for the purpose of using them in qualifiers, can we do this way: ``` @Be... |
codereview_java_data_10996 | if (this.runtimeApps.getPlatformType().equalsIgnoreCase(RuntimeApplicationHelper.KUBERNETES_PLATFORM_TYPE)) {
propertiesBuilder.put("app.*.server.port", "80");
- propertiesBuilder.put("deployer.*.kubernetes.createLoadBalancer", "true"); // requires metallb
}
return propertiesBuilder.build();
id recommen... |
codereview_java_data_11017 | Symbol varSymbol, Symbol.MethodSymbol methodSymbol, List<TreePath> usagePaths, VisitorState state) {
boolean isPrivateMethod = methodSymbol.getModifiers().contains(Modifier.PRIVATE);
int index = methodSymbol.params.indexOf(varSymbol);
- Preconditions.checkState(index != -1, "symbol... |
codereview_java_data_11018 | this.keyMetadata = toCopy.keyMetadata() == null ? null
: ByteBuffers.copy(toCopy.keyMetadata());
this.splitOffsets = toCopy.splitOffsets() == null ? null : copyList(toCopy.splitOffsets());
- this.sortOrderId = toCopy.sortOrderId() == null ? SortOrder.unsorted().orderId() : toCopy.sortOrder... |
codereview_java_data_11025 | Collectors.toList(), StringUtils.joiningWithLastDelimiter(", ", " and ")));
if (!affectedOptions.isEmpty()) {
- logger.warn("{} require {} option to be true.", affectedOptions, mainOptionName);
}
}
}
I think the verbiage could be better. Perhaps Madeline or Jake coul... |
codereview_java_data_11028 | }
static void init(TestHiveShell shell, TestTables testTables, TemporaryFolder temp, String engine) {
- init(shell, testTables, temp, engine, "false");
}
- static void init(TestHiveShell shell, TestTables testTables, TemporaryFolder temp, String engine, String cboEnable) {
shell.openSession();
fo... |
codereview_java_data_11039 | public static void exportPreferences(Context context, OutputStream os, boolean includeGlobals,
Set<String> accountUuids,boolean anonymize) throws SettingsImportExportException {
try {
XmlSerializer serializer = Xml.newSerializer();
serializer.setOutput(os, "UTF-8");... |
codereview_java_data_11042 | TableUtils.createTableIfNotExists(connectionSource, TDD.class);
// soft migration without changing DB version
- createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
"isFiltered", "integer");
- createRowIfNotExists(getDaoBgReadi... |
codereview_java_data_11046 | */
package tech.pegasys.pantheon.chainexport;
-import tech.pegasys.pantheon.ethereum.ProtocolContext;
import tech.pegasys.pantheon.ethereum.core.Block;
import tech.pegasys.pantheon.ethereum.rlp.RLP;
import tech.pegasys.pantheon.util.bytes.BytesValue;
Question: Are you writing binary data in the file ? Is it what... |
codereview_java_data_11047 | t2 = System.currentTimeMillis();
- out.printf("existent lookup rate %6.2f%n", 500 / ((t2 - t1) / 1000.0));
out.println("expected hits 500. Receive hits: " + count);
bmfr.close();
}
Maybe this should be existing? ``` suggest out.printf("existing lookup rate %6.2f%n", 500 / ((t2 - t1) / 1000.0)); `... |
codereview_java_data_11050 | import com.hazelcast.jet.pipeline.BatchSource;
import com.hazelcast.jet.pipeline.SourceBuilder;
import com.hazelcast.jet.pipeline.SourceBuilder.SourceBuffer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
any open readers (if there was some exception, or job is cancelled) should also be closed... |
codereview_java_data_11056 | Suppliers.memoize(() -> CliqueBlockHashing.recoverProposerAddress(header, this));
}
- public static BytesValue createUnsignedData(
final BytesValue vanityData, final List<Address> validators) {
return new CliqueExtraData(vanityData, null, validators, null).encode();
}
is this a warning? Or ... |
codereview_java_data_11057 | @Override
public String toString() {
- byte[] binary = new byte[value().remaining()];
- value().duplicate().get(binary);
- return "0x" + BaseEncoding.base16().encode(binary);
}
}
There's an existing ByteBuffers utility class, org.apache.iceberg.util.ByteBuffers, which you can use here.... |
codereview_java_data_11064 | public static void updateExtendedBolusInDB() {
TreatmentsInterface treatmentsInterface = new TreatmentsPlugin();
- if ( TreatmentsPlugin.getPlugin() != null) {
- treatmentsInterface = TreatmentsPlugin.getPlugin();
- }
-
DanaRPump pump = DanaRPump.getInstance();
l... |
codereview_java_data_11065 | //snippet-service:[elastictranscoder]
//snippet-sourcetype:[snippet]
//snippet-sourcedate:[]
-//snippet-sourceauthor:[]
/*
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
i don't think this is a snippet for java. is it supposed to be part of a different language PR?
//snippet... |
codereview_java_data_11095 | import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.refEq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
Should you verify `checkCompletion` wasn't called?
import static o... |
codereview_java_data_11097 | import java.util.Collection;
import java.util.Collections;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.google.common.collect.Lists;
import com.google.inject.Inject;
import com.google.inject.Singleton;
remove `limitCount` and `limitStart`, and just use `getFromZk()` instea... |
codereview_java_data_11098 | service.shutdown();
try
{
- service.awaitTermination( 500, TimeUnit.MILLISECONDS );
Log.debug( "Successfully notified all {} local users about the imminent destruction of chat service '{}'", users.size(), chatServiceName );
}
catch ( InterruptedExcept... |
codereview_java_data_11101 | import org.flowable.bpmn.converter.export.FieldExtensionExport;
import org.flowable.bpmn.converter.export.MapExceptionExport;
import org.flowable.bpmn.converter.util.BpmnXMLUtil;
-import org.flowable.bpmn.model.*;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
Please note the pr... |
codereview_java_data_11105 | * When there is no file matching the glob specified by
* {@link #glob(String)} (or the default glob) Jet throws an exception by
* default. This might be problematic in some cases, where the directory
- * is empty. To override this behaviour set this to true. The source
* <p>
* If set t... |
codereview_java_data_11108 | TSERV_COMPACTION_SERVICE_ROOT_PLANNER("tserver.compaction.major.service.root.planner",
DefaultCompactionPlanner.class.getName(), PropertyType.CLASSNAME,
"Compaction planner for root tablet service"),
- TSERV_COMPACTION_SERVICE_ROOT_THROUGHPUT("tserver.compaction.major.service.root.throughput", "0B",
... |
codereview_java_data_11127 | *
* @param member {@link Member}
*/
- public static void onSuccess(Member member) {
final NodeState old = member.getState();
manager.getMemberAddressInfos().add(member.getAddress());
member.setState(NodeState.UP);
Only add but no remove after change.
*
* @pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.