package com.google.cloud.hadoop.fs.gcs;

import org.apache.hadoop.fs.FileSystem;

/**
 * Hadoop 2 specific implementation of {@link FileSystem}.
 *
 * @see GoogleHadoopFileSystemBase
 */
abstract class GoogleHadoopFileSystemBaseSpecific extends FileSystem {}

@@ -45,215 +45,1973 @@
 ort 
-org.apache.hadoop.fs.FileSystem;%0A%0A/**%0A * Hadoop 2 specific implementation of %7B@link FileSystem%7D.%0A *%0A * @see GoogleHadoopFileSystemBase%0A */%0Aabstract class GoogleHadoopFileSystemBaseSpecific extends FileSystem %7B
+static com.google.common.base.Preconditions.checkNotNull;%0A%0Aimport com.google.cloud.hadoop.gcsio.GoogleCloudStorageFileSystem;%0Aimport com.google.cloud.hadoop.gcsio.GoogleCloudStorageItemInfo;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.net.URI;%0Aimport java.util.EnumSet;%0Aimport org.apache.hadoop.fs.FSDataOutputStream;%0Aimport org.apache.hadoop.fs.FileSystem;%0Aimport org.apache.hadoop.fs.Path;%0Aimport org.apache.hadoop.fs.permission.FsPermission;%0Aimport org.apache.hadoop.util.Progressable;%0A%0A/**%0A * Hadoop 2 specific implementation of %7B@link FileSystem%7D.%0A *%0A * @see GoogleHadoopFileSystemBase%0A */%0Aabstract class GoogleHadoopFileSystemBaseSpecific extends FileSystem %7B%0A%0A  /** @see GoogleHadoopFileSystemBase#getGcsPath(Path) */%0A  public abstract URI getGcsPath(Path hadoopPath);%0A%0A  /** @see GoogleHadoopFileSystemBase#getGcsFs() */%0A  public abstract GoogleCloudStorageFileSystem getGcsFs();%0A%0A  /** %7B@inheritDoc%7D */%0A  @Override%0A  public FSDataOutputStream createNonRecursive(%0A      Path hadoopPath,%0A      FsPermission permission,%0A      EnumSet%3Corg.apache.hadoop.fs.CreateFlag%3E flags,%0A      int bufferSize,%0A      short replication,%0A      long blockSize,%0A      Progressable progress)%0A      throws IOException %7B%0A    URI gcsPath = getGcsPath(checkNotNull(hadoopPath, %22hadoopPath must not be null%22));%0A    URI parentGcsPath = getGcsFs().getParentPath(gcsPath);%0A    GoogleCloudStorageItemInfo parentInfo = getGcsFs().getFileInfo(parentGcsPath).getItemInfo();%0A    if (!parentInfo.isRoot() && !parentInfo.isBucket() && !parentInfo.exists()) %7B%0A      throw new FileNotFoundException(%0A          String.format(%0A              %22Can not create '%25s' file, because parent folder does not exist: %25s%22,%0A              gcsPath, parentGcsPath));%0A    %7D%0A    return create(%0A        hadoopPath,%0A        permission,%0A        flags.contains(org.apache.hadoop.fs.CreateFlag.OVERWRITE),%0A        bufferSize,%0A        replication,%0A        blockSize,%0A        progress);%0A  %7D%0A
 %7D%0A

Fix HDFS compliance tests (Hadoop 2.9)