HADOOP-18284. Remove Unnecessary semicolon ';' (#4422). Contributed by fanshilun.
This commit is contained in:
parent
321a4844ad
commit
073b8ea1d5
|
@ -164,7 +164,7 @@ public class TestLocalFileSystem {
|
||||||
public void testSyncable() throws IOException {
|
public void testSyncable() throws IOException {
|
||||||
FileSystem fs = fileSys.getRawFileSystem();
|
FileSystem fs = fileSys.getRawFileSystem();
|
||||||
Path file = new Path(TEST_ROOT_DIR, "syncable");
|
Path file = new Path(TEST_ROOT_DIR, "syncable");
|
||||||
FSDataOutputStream out = fs.create(file);;
|
FSDataOutputStream out = fs.create(file);
|
||||||
final int bytesWritten = 1;
|
final int bytesWritten = 1;
|
||||||
byte[] expectedBuf = new byte[] {'0', '1', '2', '3'};
|
byte[] expectedBuf = new byte[] {'0', '1', '2', '3'};
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -516,7 +516,7 @@ public class TestTFileSeqFileComparison {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class MyOptions {
|
private static class MyOptions {
|
||||||
String rootDir = GenericTestUtils.getTestDir().getAbsolutePath();;
|
String rootDir = GenericTestUtils.getTestDir().getAbsolutePath();
|
||||||
String compress = "gz";
|
String compress = "gz";
|
||||||
String format = "tfile";
|
String format = "tfile";
|
||||||
int dictSize = 1000;
|
int dictSize = 1000;
|
||||||
|
|
|
@ -289,7 +289,7 @@ public class RPCCallBenchmark extends TestRpcBase implements Tool {
|
||||||
long cpuNanosClient = getTotalCpuTime(ctx.getTestThreads());
|
long cpuNanosClient = getTotalCpuTime(ctx.getTestThreads());
|
||||||
long cpuNanosServer = -1;
|
long cpuNanosServer = -1;
|
||||||
if (server != null) {
|
if (server != null) {
|
||||||
cpuNanosServer = getTotalCpuTime(server.getHandlers());;
|
cpuNanosServer = getTotalCpuTime(server.getHandlers());
|
||||||
}
|
}
|
||||||
System.out.println("====== Results ======");
|
System.out.println("====== Results ======");
|
||||||
System.out.println("Options:\n" + opts);
|
System.out.println("Options:\n" + opts);
|
||||||
|
|
|
@ -111,16 +111,16 @@ public class TestWhitelistBasedResolver {
|
||||||
assertEquals (wqr.getDefaultProperties(),
|
assertEquals (wqr.getDefaultProperties(),
|
||||||
wqr.getServerProperties(InetAddress.getByName("10.119.103.112")));
|
wqr.getServerProperties(InetAddress.getByName("10.119.103.112")));
|
||||||
|
|
||||||
assertEquals (SASL_PRIVACY_PROPS, wqr.getServerProperties("10.119.103.113"));
|
assertEquals(SASL_PRIVACY_PROPS, wqr.getServerProperties("10.119.103.113"));
|
||||||
|
|
||||||
assertEquals (wqr.getDefaultProperties(), wqr.getServerProperties("10.221.103.121"));
|
assertEquals(wqr.getDefaultProperties(), wqr.getServerProperties("10.221.103.121"));
|
||||||
|
|
||||||
assertEquals (SASL_PRIVACY_PROPS, wqr.getServerProperties("10.221.104.0"));
|
assertEquals(SASL_PRIVACY_PROPS, wqr.getServerProperties("10.221.104.0"));
|
||||||
assertEquals (SASL_PRIVACY_PROPS, wqr.getServerProperties("10.222.103.121"));
|
assertEquals(SASL_PRIVACY_PROPS, wqr.getServerProperties("10.222.103.121"));
|
||||||
assertEquals (SASL_PRIVACY_PROPS, wqr.getServerProperties("10.223.104.0"));
|
assertEquals(SASL_PRIVACY_PROPS, wqr.getServerProperties("10.223.104.0"));
|
||||||
assertEquals (SASL_PRIVACY_PROPS, wqr.getServerProperties("10.113.221.221"));
|
assertEquals(SASL_PRIVACY_PROPS, wqr.getServerProperties("10.113.221.221"));
|
||||||
assertEquals (SASL_PRIVACY_PROPS, wqr.getServerProperties("10.113.221.222"));
|
assertEquals(SASL_PRIVACY_PROPS, wqr.getServerProperties("10.113.221.222"));
|
||||||
assertEquals (wqr.getDefaultProperties(), wqr.getServerProperties("127.0.0.1"));;
|
assertEquals(wqr.getDefaultProperties(), wqr.getServerProperties("127.0.0.1"));
|
||||||
|
|
||||||
TestFileBasedIPList.removeFile("fixedwhitelist.txt");
|
TestFileBasedIPList.removeFile("fixedwhitelist.txt");
|
||||||
TestFileBasedIPList.removeFile("variablewhitelist.txt");
|
TestFileBasedIPList.removeFile("variablewhitelist.txt");
|
||||||
|
|
|
@ -745,7 +745,7 @@ public class IPCLoggerChannel implements AsyncLogger {
|
||||||
URI uri = URI.create(ret.getFromURL());
|
URI uri = URI.create(ret.getFromURL());
|
||||||
httpServerURL = getHttpServerURI(uri.getScheme(), uri.getPort());
|
httpServerURL = getHttpServerURI(uri.getScheme(), uri.getPort());
|
||||||
} else {
|
} else {
|
||||||
httpServerURL = getHttpServerURI("http", ret.getHttpPort());;
|
httpServerURL = getHttpServerURI("http", ret.getHttpPort());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ public class IPCLoggerChannel implements AsyncLogger {
|
||||||
URI uri = URI.create(ret.getFromURL());
|
URI uri = URI.create(ret.getFromURL());
|
||||||
httpServerURL = getHttpServerURI(uri.getScheme(), uri.getPort());
|
httpServerURL = getHttpServerURI(uri.getScheme(), uri.getPort());
|
||||||
} else {
|
} else {
|
||||||
httpServerURL = getHttpServerURI("http", ret.getHttpPort());;
|
httpServerURL = getHttpServerURI("http", ret.getHttpPort());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -803,7 +803,7 @@ public class SecondaryNameNode implements Runnable,
|
||||||
geteditsizeOpt = new Option("geteditsize",
|
geteditsizeOpt = new Option("geteditsize",
|
||||||
"return the number of uncheckpointed transactions on the NameNode");
|
"return the number of uncheckpointed transactions on the NameNode");
|
||||||
checkpointOpt = OptionBuilder.withArgName("force")
|
checkpointOpt = OptionBuilder.withArgName("force")
|
||||||
.hasOptionalArg().withDescription("checkpoint on startup").create("checkpoint");;
|
.hasOptionalArg().withDescription("checkpoint on startup").create("checkpoint");
|
||||||
formatOpt = new Option("format", "format the local storage during startup");
|
formatOpt = new Option("format", "format the local storage during startup");
|
||||||
helpOpt = new Option("h", "help", false, "get help information");
|
helpOpt = new Option("h", "help", false, "get help information");
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class TestAddBlockRetry {
|
||||||
HdfsConstants.GRANDFATHER_INODE_ID,
|
HdfsConstants.GRANDFATHER_INODE_ID,
|
||||||
"clientName", null, onRetryBlock);
|
"clientName", null, onRetryBlock);
|
||||||
} finally {
|
} finally {
|
||||||
ns.readUnlock();;
|
ns.readUnlock();
|
||||||
}
|
}
|
||||||
DatanodeStorageInfo targets[] = FSDirWriteFileOp.chooseTargetForNewBlock(
|
DatanodeStorageInfo targets[] = FSDirWriteFileOp.chooseTargetForNewBlock(
|
||||||
ns.getBlockManager(), src, null, null, null, r);
|
ns.getBlockManager(), src, null, null, null, r);
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class TestCheckPointForSecurityTokens {
|
||||||
log.scanLog(Long.MAX_VALUE, true);
|
log.scanLog(Long.MAX_VALUE, true);
|
||||||
long numTransactions = (log.getLastTxId() - log.getFirstTxId()) + 1;
|
long numTransactions = (log.getLastTxId() - log.getFirstTxId()) + 1;
|
||||||
assertEquals("In-progress log " + log + " should have 5 transactions",
|
assertEquals("In-progress log " + log + " should have 5 transactions",
|
||||||
5, numTransactions);;
|
5, numTransactions);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Saving image in safe mode should succeed
|
// Saving image in safe mode should succeed
|
||||||
|
|
|
@ -2613,7 +2613,7 @@ public class TestCheckpoint {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CheckpointStorage spyOnSecondaryImage(SecondaryNameNode secondary1) {
|
private static CheckpointStorage spyOnSecondaryImage(SecondaryNameNode secondary1) {
|
||||||
CheckpointStorage spy = Mockito.spy((CheckpointStorage)secondary1.getFSImage());;
|
CheckpointStorage spy = Mockito.spy((CheckpointStorage)secondary1.getFSImage());
|
||||||
secondary1.setFSImage(spy);
|
secondary1.setFSImage(spy);
|
||||||
return spy;
|
return spy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class TestFavoredNodesEndToEnd {
|
||||||
d.stopDecommission();
|
d.stopDecommission();
|
||||||
|
|
||||||
BlockLocation[] locations = getBlockLocations(p);
|
BlockLocation[] locations = getBlockLocations(p);
|
||||||
Assert.assertEquals(replication, locations[0].getNames().length);;
|
Assert.assertEquals(replication, locations[0].getNames().length);
|
||||||
//also make sure that the datanode[0] is not in the list of hosts
|
//also make sure that the datanode[0] is not in the list of hosts
|
||||||
for (int i = 0; i < replication; i++) {
|
for (int i = 0; i < replication; i++) {
|
||||||
final String loc = locations[0].getNames()[i];
|
final String loc = locations[0].getNames()[i];
|
||||||
|
|
|
@ -317,7 +317,7 @@ public class TestDelegationTokensWithHA {
|
||||||
longUgi.doAs(new PrivilegedExceptionAction<Void>() {
|
longUgi.doAs(new PrivilegedExceptionAction<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public Void run() throws Exception {
|
public Void run() throws Exception {
|
||||||
token.cancel(conf);;
|
token.cancel(conf);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -150,8 +150,8 @@ public class MapTask extends Task {
|
||||||
* @param <V>
|
* @param <V>
|
||||||
*/
|
*/
|
||||||
class TrackedRecordReader<K, V>
|
class TrackedRecordReader<K, V>
|
||||||
implements RecordReader<K,V> {
|
implements RecordReader<K, V> {
|
||||||
private RecordReader<K,V> rawIn;
|
private RecordReader<K, V> rawIn;
|
||||||
private Counters.Counter fileInputByteCounter;
|
private Counters.Counter fileInputByteCounter;
|
||||||
private Counters.Counter inputRecordCounter;
|
private Counters.Counter inputRecordCounter;
|
||||||
private TaskReporter reporter;
|
private TaskReporter reporter;
|
||||||
|
@ -240,7 +240,7 @@ public class MapTask extends Task {
|
||||||
* This class skips the records based on the failed ranges from previous
|
* This class skips the records based on the failed ranges from previous
|
||||||
* attempts.
|
* attempts.
|
||||||
*/
|
*/
|
||||||
class SkippingRecordReader<K, V> extends TrackedRecordReader<K,V> {
|
class SkippingRecordReader<K, V> extends TrackedRecordReader<K, V> {
|
||||||
private SkipRangeIterator skipIt;
|
private SkipRangeIterator skipIt;
|
||||||
private SequenceFile.Writer skipWriter;
|
private SequenceFile.Writer skipWriter;
|
||||||
private boolean toWriteSkipRecs;
|
private boolean toWriteSkipRecs;
|
||||||
|
@ -930,7 +930,7 @@ public class MapTask extends Task {
|
||||||
// spill accounting
|
// spill accounting
|
||||||
private int maxRec;
|
private int maxRec;
|
||||||
private int softLimit;
|
private int softLimit;
|
||||||
boolean spillInProgress;;
|
boolean spillInProgress;
|
||||||
int bufferRemaining;
|
int bufferRemaining;
|
||||||
volatile Throwable sortSpillException = null;
|
volatile Throwable sortSpillException = null;
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class LongValueMax implements ValueAggregator<String> {
|
||||||
* expected to be used by the a combiner.
|
* expected to be used by the a combiner.
|
||||||
*/
|
*/
|
||||||
public ArrayList<String> getCombinerOutput() {
|
public ArrayList<String> getCombinerOutput() {
|
||||||
ArrayList<String> retv = new ArrayList<String>(1);;
|
ArrayList<String> retv = new ArrayList<String>(1);
|
||||||
retv.add("" + maxVal);
|
retv.add("" + maxVal);
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ public class HsTasksBlock extends HtmlBlock {
|
||||||
long sortFinishTime = -1;
|
long sortFinishTime = -1;
|
||||||
long attemptFinishTime = -1;
|
long attemptFinishTime = -1;
|
||||||
long elapsedShuffleTime = -1;
|
long elapsedShuffleTime = -1;
|
||||||
long elapsedSortTime = -1;;
|
long elapsedSortTime = -1;
|
||||||
long elapsedReduceTime = -1;
|
long elapsedReduceTime = -1;
|
||||||
long attemptElapsed = -1;
|
long attemptElapsed = -1;
|
||||||
TaskAttempt successful = info.getSuccessful();
|
TaskAttempt successful = info.getSuccessful();
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class BigMapOutput extends Configured implements Tool {
|
||||||
BytesWritable.class, BytesWritable.class,
|
BytesWritable.class, BytesWritable.class,
|
||||||
CompressionType.NONE);
|
CompressionType.NONE);
|
||||||
long numBytesToWrite = fileSizeInMB * 1024 * 1024;
|
long numBytesToWrite = fileSizeInMB * 1024 * 1024;
|
||||||
int minKeySize = conf.getInt(MIN_KEY, 10);;
|
int minKeySize = conf.getInt(MIN_KEY, 10);
|
||||||
int keySizeRange =
|
int keySizeRange =
|
||||||
conf.getInt(MAX_KEY, 1000) - minKeySize;
|
conf.getInt(MAX_KEY, 1000) - minKeySize;
|
||||||
int minValueSize = conf.getInt(MIN_VALUE, 0);
|
int minValueSize = conf.getInt(MIN_VALUE, 0);
|
||||||
|
|
|
@ -179,8 +179,7 @@ public abstract class NotificationTestCase extends HadoopTestCase {
|
||||||
|
|
||||||
// Hack for local FS that does not have the concept of a 'mounting point'
|
// Hack for local FS that does not have the concept of a 'mounting point'
|
||||||
if (isLocalFS()) {
|
if (isLocalFS()) {
|
||||||
String localPathRoot = System.getProperty("test.build.data","/tmp")
|
String localPathRoot = System.getProperty("test.build.data", "/tmp").replace(' ', '+');
|
||||||
.toString().replace(' ', '+');;
|
|
||||||
inDir = new Path(localPathRoot, inDir);
|
inDir = new Path(localPathRoot, inDir);
|
||||||
outDir = new Path(localPathRoot, outDir);
|
outDir = new Path(localPathRoot, outDir);
|
||||||
}
|
}
|
||||||
|
@ -217,8 +216,7 @@ public abstract class NotificationTestCase extends HadoopTestCase {
|
||||||
|
|
||||||
// Hack for local FS that does not have the concept of a 'mounting point'
|
// Hack for local FS that does not have the concept of a 'mounting point'
|
||||||
if (isLocalFS()) {
|
if (isLocalFS()) {
|
||||||
String localPathRoot = System.getProperty("test.build.data","/tmp")
|
String localPathRoot = System.getProperty("test.build.data", "/tmp").replace(' ', '+');
|
||||||
.toString().replace(' ', '+');;
|
|
||||||
inDir = new Path(localPathRoot, inDir);
|
inDir = new Path(localPathRoot, inDir);
|
||||||
outDir = new Path(localPathRoot, outDir);
|
outDir = new Path(localPathRoot, outDir);
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,7 +437,7 @@ public class TestValueIterReset {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
while (values.hasNext()) {
|
while (values.hasNext()) {
|
||||||
i = values.next();;
|
i = values.next();
|
||||||
LOG.info(key + ":" + i);
|
LOG.info(key + ":" + i);
|
||||||
|
|
||||||
if (count == 5) {
|
if (count == 5) {
|
||||||
|
|
|
@ -84,7 +84,7 @@ class LongLong {
|
||||||
final long v = x1*y1;
|
final long v = x1*y1;
|
||||||
|
|
||||||
final long tmp = (t - u)>>>1;
|
final long tmp = (t - u)>>>1;
|
||||||
result.d0 = ((t + u)>>>1) - v + ((tmp << MID) & FULL_MASK);;
|
result.d0 = ((t + u)>>>1) - v + ((tmp << MID) & FULL_MASK);
|
||||||
result.d1 = v + (tmp >> MID);
|
result.d1 = v + (tmp >> MID);
|
||||||
return result;
|
return result;
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1928,7 +1928,7 @@ public class TestYarnCLI {
|
||||||
QueueCLI cli = createAndGetQueueCLI();
|
QueueCLI cli = createAndGetQueueCLI();
|
||||||
when(client.getQueueInfo(any(String.class))).thenReturn(null);
|
when(client.getQueueInfo(any(String.class))).thenReturn(null);
|
||||||
int result = cli.run(new String[] { "-status", queueName });
|
int result = cli.run(new String[] { "-status", queueName });
|
||||||
assertEquals(-1, result);;
|
assertEquals(-1, result);
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
PrintWriter pw = new PrintWriter(baos);
|
PrintWriter pw = new PrintWriter(baos);
|
||||||
pw.println("Cannot get queue from RM by queueName = " + queueName
|
pw.println("Cannot get queue from RM by queueName = " + queueName
|
||||||
|
|
|
@ -62,7 +62,7 @@ import java.util.List;
|
||||||
public class ReservationAllocationStatePBImpl extends
|
public class ReservationAllocationStatePBImpl extends
|
||||||
ReservationAllocationState {
|
ReservationAllocationState {
|
||||||
private ReservationAllocationStateProto proto =
|
private ReservationAllocationStateProto proto =
|
||||||
ReservationAllocationStateProto.getDefaultInstance();;
|
ReservationAllocationStateProto.getDefaultInstance();
|
||||||
private ReservationAllocationStateProto.Builder builder = null;
|
private ReservationAllocationStateProto.Builder builder = null;
|
||||||
private boolean viaProto = false;
|
private boolean viaProto = false;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ConfiguredYarnAuthorizer extends YarnAuthorizationProvider {
|
||||||
private final ConcurrentMap<PrivilegedEntity, Map<AccessType, AccessControlList>>
|
private final ConcurrentMap<PrivilegedEntity, Map<AccessType, AccessControlList>>
|
||||||
allAcls = new ConcurrentHashMap<>();
|
allAcls = new ConcurrentHashMap<>();
|
||||||
private volatile AccessControlList adminAcl = null;
|
private volatile AccessControlList adminAcl = null;
|
||||||
private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();;
|
private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
||||||
private final ReentrantReadWriteLock.ReadLock readLock = lock.readLock();
|
private final ReentrantReadWriteLock.ReadLock readLock = lock.readLock();
|
||||||
private final ReentrantReadWriteLock.WriteLock writeLock = lock.writeLock();
|
private final ReentrantReadWriteLock.WriteLock writeLock = lock.writeLock();
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ public class WindowsSecureContainerExecutor extends DefaultContainerExecutor {
|
||||||
COMPLETE
|
COMPLETE
|
||||||
};
|
};
|
||||||
|
|
||||||
private State state;;
|
private State state;
|
||||||
|
|
||||||
private final String cwd;
|
private final String cwd;
|
||||||
private final String jobName;
|
private final String jobName;
|
||||||
|
|
|
@ -496,7 +496,7 @@ public class ProportionalCapacityPreemptionPolicy
|
||||||
Map<ApplicationAttemptId, Set<RMContainer>> toPreempt =
|
Map<ApplicationAttemptId, Set<RMContainer>> toPreempt =
|
||||||
new HashMap<>();
|
new HashMap<>();
|
||||||
Map<PreemptionCandidatesSelector, Map<ApplicationAttemptId,
|
Map<PreemptionCandidatesSelector, Map<ApplicationAttemptId,
|
||||||
Set<RMContainer>>> toPreemptPerSelector = new HashMap<>();;
|
Set<RMContainer>>> toPreemptPerSelector = new HashMap<>();
|
||||||
for (PreemptionCandidatesSelector selector :
|
for (PreemptionCandidatesSelector selector :
|
||||||
candidatesSelectionPolicies) {
|
candidatesSelectionPolicies) {
|
||||||
long startTime = 0;
|
long startTime = 0;
|
||||||
|
|
|
@ -1772,7 +1772,7 @@ public class TestAppManager extends AppManagerTestBase{
|
||||||
RecordFactory recordFactory) {
|
RecordFactory recordFactory) {
|
||||||
ContainerLaunchContext amContainer = recordFactory.newRecordInstance(
|
ContainerLaunchContext amContainer = recordFactory.newRecordInstance(
|
||||||
ContainerLaunchContext.class);
|
ContainerLaunchContext.class);
|
||||||
amContainer.setApplicationACLs(new HashMap<ApplicationAccessType, String>());;
|
amContainer.setApplicationACLs(new HashMap<ApplicationAccessType, String>());
|
||||||
return amContainer;
|
return amContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class TestRMAdminService {
|
public class TestRMAdminService {
|
||||||
|
|
||||||
private Configuration configuration;;
|
private Configuration configuration;
|
||||||
private MockRM rm = null;
|
private MockRM rm = null;
|
||||||
private FileSystem fs;
|
private FileSystem fs;
|
||||||
private Path workingPath;
|
private Path workingPath;
|
||||||
|
|
Loading…
Reference in New Issue