Skip to content

Commit be584a5

Browse files
Take CR suggestions
1 parent 46f32e5 commit be584a5

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ enum GcsStatistics {
5353
TYPE_DURATION);
5454

5555
private final String description;
56-
private StatisticTypeEnum type;
57-
private String symbol;
56+
private final StatisticTypeEnum type;
57+
private final String symbol;
5858

5959
StatisticTypeEnum getType() {
6060
return this.type;

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ public class GoogleHadoopFileSystem extends FileSystem implements IOStatisticsSo
110110
private GoogleCloudStorageFileSystem gcsFs;
111111
private boolean isClosed;
112112
private FsPermission reportedPermissions;
113+
114+
/**
115+
* Setting this to static inorder to have a singleton instance. This will help us get the JVM
116+
* level metrics. Note that we use this to generate Global Storage Statistics. If we make this
117+
* an instance field, only the first filesystem instance metrics will be updated since while initializing
118+
* GlobalStorageStatistics (refer initialize()) only the first instance will be registered.
119+
*
120+
* For filesystem instance level instrumentation, one more per instance object can be created and both
121+
* be updated.
122+
*/
113123
private static GcsInstrumentation instrumentation = new GcsInstrumentation();
114124
private GcsStorageStatistics storageStatistics;
115125

hadoop-tools/hadoop-gcp/src/site/markdown/tools/hadoop-gcp/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
* `UNAUTHENTICATED` - configures unauthenticated access
8080

81-
* `USER_CREDENTIALS` - configure [user credentials](https://www.google.com/search?q=%23user-credentials)
81+
* `USER_CREDENTIALS` - configure [user credentials](#user-credentials)
8282

8383
* `fs.gs.auth.service.account.json.keyfile` (not set by default)
8484

hadoop-tools/hadoop-gcp/src/site/markdown/tools/hadoop-gcp/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Example:
6565
</property>
6666
<property>
6767
<name>fs.contract.test.fs.gs</name>
68-
<value>YOUR_BUCKET_NAME</value>
68+
<value>gs://your_bucket</value>
6969
</property>
7070
</configuration>
7171
```

0 commit comments

Comments
 (0)