Skip to content

Commit b5b8e36

Browse files
Take CR comments
1 parent 3d3a3a2 commit b5b8e36

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

hadoop-tools/hadoop-gcp/src/main/java/org/apache/hadoop/fs/gs/GoogleCloudStorageClientReadChannel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class GoogleCloudStorageClientReadChannel implements SeekableByteChannel {
6161

6262
// The size of this object generation, in bytes.
6363
private long objectSize;
64-
// private final ErrorTypeExtractor errorExtractor;
6564
private ContentReadChannel contentReadChannel;
6665
private boolean gzipEncoded = false;
6766
private boolean open = true;

hadoop-tools/hadoop-gcp/src/main/java/org/apache/hadoop/fs/gs/GoogleCloudStorageFileSystem.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,10 @@ void rename(URI src, URI dst) throws IOException {
448448
private void renameObject(URI src, URI dst, FileInfo srcInfo) throws IOException {
449449
StorageResourceId srcResourceId =
450450
StorageResourceId.fromUriPath(src, /* allowEmptyObjectName= */ true);
451-
StorageResourceId dstResourceId =
452-
StorageResourceId.fromUriPath(dst, /* allowEmptyObjectName= */ true, /* generationId= */ 0L);
451+
StorageResourceId dstResourceId = StorageResourceId.fromUriPath(
452+
dst,
453+
/* allowEmptyObjectName= */ true,
454+
/* generationId= */ 0L);
453455

454456
if (srcResourceId.getBucketName().equals(dstResourceId.getBucketName())) {
455457
gcs.move(

hadoop-tools/hadoop-gcp/src/main/java/org/apache/hadoop/fs/gs/GoogleHadoopFileSystemConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ public Pattern getMarkerFilePattern() {
182182
}
183183

184184
if (fileMarkerFilePattern == null) {
185-
this.fileMarkerFilePattern = Pattern.compile("^(.+/)?" + pattern + "$");
185+
// Caching the pattern since compile step can be expensive
186+
fileMarkerFilePattern = Pattern.compile("^(.+/)?" + pattern + "$");
186187
}
187188

188189
return fileMarkerFilePattern;

hadoop-tools/hadoop-gcp/src/main/java/org/apache/hadoop/fs/gs/Gs.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,4 @@ protected void finalize() throws Throwable {
6161
fsImpl.close();
6262
super.finalize();
6363
}
64-
}
65-
66-
64+
}

0 commit comments

Comments
 (0)