Skip to content

Commit

Permalink
Add VisibleForTesting annotation for public fields in xxxxFileSystemP…
Browse files Browse the repository at this point in the history
…rovider and add more comments.
  • Loading branch information
yuqi1129 committed Oct 29, 2024
1 parent 218acae commit 8ff278f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.gravitino.oss.fs;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import java.io.IOException;
import java.util.Map;
Expand All @@ -40,6 +41,8 @@ public class OSSFileSystemProvider implements FileSystemProvider {
// For example, User can use oss-endpoint to set the endpoint of OSS 'fs.oss.endpoint' in
// Gravitino.
// GCS and S3 also have similar mapping relationship.

@VisibleForTesting
public static final Map<String, String> GRAVITINO_KEY_TO_OSS_HADOOP_KEY =
ImmutableMap.of(
OSSProperties.GRAVITINO_OSS_ENDPOINT, Constants.ENDPOINT_KEY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.apache.gravitino.s3.fs;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import java.io.IOException;
import java.util.Map;
Expand All @@ -33,6 +34,7 @@

public class S3FileSystemProvider implements FileSystemProvider {

@VisibleForTesting
public static final Map<String, String> GRAVITINO_KEY_TO_S3_HADOOP_KEY =
ImmutableMap.of(
S3Properties.GRAVITINO_S3_ENDPOINT, Constants.ENDPOINT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.gravitino.gcs.fs;

import com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import java.io.IOException;
import java.util.Map;
Expand All @@ -36,6 +37,7 @@ public class GCSFileSystemProvider implements FileSystemProvider {
private static final String GCS_SERVICE_ACCOUNT_JSON_FILE =
"fs.gs.auth.service.account.json.keyfile";

@VisibleForTesting
public static final Map<String, String> GRAVITINO_KEY_TO_GCS_HADOOP_KEY =
ImmutableMap.of(GCSProperties.GCS_SERVICE_ACCOUNT_JSON_PATH, GCS_SERVICE_ACCOUNT_JSON_FILE);

Expand Down

0 comments on commit 8ff278f

Please sign in to comment.