title: Fail to run Spark job when using globStatus and Google Cloud Storage bucket as input
body: <p>i am using Spark 1.1.
  I have a Spark job that seeks for a certain pattern of folders only under a bucket (i.e. folders that start with...), and should process only those. I achieve this by doing the following:</p>
  
  <pre><code>FileSystem fs = FileSystem.get(new Configuration(true));
  FileStatus[] statusArr = fs.globStatus(new Path(inputPath));
  List&lt;FileStatus&gt; statusList = Arrays.asList(statusArr);
  
  List&lt;String&gt; pathsStr = convertFileStatusToPath(statusList);
  
  JavaRDD&lt;String&gt; paths = sc.parallelize(pathsStr);
  </code></pre>
  
  <p>However, when running this job on a Google Cloud Storage path:  gs://rsync-1/2014_07_31* (using the latest google cloud storage connector 1.2.9), I get the following error:</p>
  
  <pre><code>4/10/13 10:28:38 INFO slf4j.Slf4jLogger: Slf4jLogger started    
  14/10/13 10:28:38 INFO util.Utils: Successfully started service 'Driver' on port 60379.    
  14/10/13 10:28:38 INFO worker.WorkerWatcher: Connecting to worker akka.tcp://sparkWorker@hadoop-w-9.c.taboola-qa-01.internal:45212/user/Worker    
  Exception in thread "main" java.lang.reflect.InvocationTargetException    
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)    
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    
      at java.lang.reflect.Method.invoke(Method.java:606)    
      at org.apache.spark.deploy.worker.DriverWrapper$.main(DriverWrapper.scala:40)    
      at org.apache.spark.deploy.worker.DriverWrapper.main(DriverWrapper.scala)    
  Caused by: java.lang.IllegalArgumentException: Wrong bucket: rsync-1, in path: gs://rsync-1/2014_07_31*, expected bucket: hadoop-config    
      at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem.checkPath(GoogleHadoopFileSystem.java:100)    
      at org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:294)    
      at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.makeQualified(GoogleHadoopFileSystemBase.java:457)    
      at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem.getGcsPath(GoogleHadoopFileSystem.java:163)    
      at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.globStatus(GoogleHadoopFileSystemBase.java:1052)    
      at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.globStatus(GoogleHadoopFileSystemBase.java:1027)    
      at com.doit.customer.dataconverter.Phase0.main(Phase0.java:578)    
  ... 6 more
  </code></pre>
  
  <p>When I ran this job on a local folder, everything worked fine.</p>
  
  <p>hadoop-config is a bucket I use for deploying the Spark cluster on Google Compute Engine (using bdutil 0.35.2 tool)</p>