Java Code Examples for com.google.cloud.hadoop.gcsio.GoogleCloudStorageFileSystem#SCHEME
The following examples show how to use
com.google.cloud.hadoop.gcsio.GoogleCloudStorageFileSystem#SCHEME .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GcsConf.java From pentaho-hadoop-shims with Apache License 2.0 | 5 votes |
@Override public Path mapPath( Path pvfsPath ) { validatePath( pvfsPath ); String[] splitPath = pvfsPath.toUri().getPath().split( "/" ); Preconditions.checkArgument( splitPath.length > 0 ); String bucket = splitPath[1]; String path = SEPARATOR + Arrays.stream( splitPath ).skip( 2 ).collect( Collectors.joining( SEPARATOR ) ); try { return new Path( new URI( GoogleCloudStorageFileSystem.SCHEME, bucket, path, null ) ); } catch ( URISyntaxException e ) { throw new IllegalStateException( e ); } }
Example 2
Source File: GoogleHadoopFileSystem.java From hadoop-connectors with Apache License 2.0 | 4 votes |
/** * As the global-rooted FileSystem, our hadoop-path "scheme" is exactly equal to the general * GCS scheme. */ @Override public String getScheme() { return GoogleCloudStorageFileSystem.SCHEME; }