Examples of HadoopException


Examples of org.springframework.data.hadoop.HadoopException

          FileSystem srcFS = getFS(src);
          results.addAll(Arrays.asList(FileUtil.stat2Paths(srcFS.globStatus(src), src)));
        }
      }
    } catch (IOException ex) {
      throw new HadoopException("Cannot execute command " + ex.getMessage(), ex);
    }

    return Collections.unmodifiableCollection(results);
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

    try {
      FileSystem dstFs = getFS(dstPath);
      dstFs.copyFromLocalFile(false, false, srcs.toArray(new Path[srcs.size()]), dstPath);
    } catch (IOException ex) {
      throw new HadoopException("Cannot copy resources " + ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

        Path p = status.getPath();
        File f = dstIsDir ? new File(dst, p.getName()) : dst;
        copyToLocal(srcFs, p, f, crc);
      }
    } catch (IOException ex) {
      throw new HadoopException("Cannot copy resources " + ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

        for (FileStatus s : statuses) {
          Path p = s.getPath();
          results.put(p, fs.getContentSummary(p));
        }
      } catch (IOException ex) {
        throw new HadoopException("Cannot find listing " + ex.getMessage(), ex);
      }
    }

    return Collections.unmodifiableMap(results);
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

        for (Path fromPath : from) {
          FileUtil.copy(srcFs, fromPath, dstFs, dstPath, false, configuration);
        }
      }
    } catch (IOException ex) {
      throw new HadoopException("Cannot copy resources " + ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

          }
        }
        else {
          FileStatus items[] = srcFs.listStatus(FileUtil.stat2Paths(fileStatus, srcPath));
          if (ObjectUtils.isEmpty(items) && (!srcFs.exists(srcPath))) {
            throw new HadoopException("Cannot access " + src + ": No such file or directory.");
          }
          for (FileStatus status : items) {
            Long size = (status.isDir() ? srcFs.getContentSummary(status.getPath()).getLength() : status.getLen());
            results.put(status.getPath(), size);
          }
        }
      }
    } catch (IOException ex) {
      throw new HadoopException("Cannot inspect resources " + ex.getMessage(), ex);
    }

    return Collections.unmodifiableMap(results);
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

  public void expunge() {
    try {
      trash.expunge();
      trash.checkpoint();
    } catch (IOException ex) {
      throw new HadoopException("Cannot expunge trash" + ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

          FileUtil.copyMerge(srcFs, srcs[i], FileSystem.getLocal(configuration), dst, false, configuration,
              null);
        }
      }
    } catch (IOException ex) {
      throw new HadoopException("Cannot getmerge " + ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

      }

      return Collections.unmodifiableCollection(results);

    } catch (IOException ex) {
      throw new HadoopException("Cannot list resources " + ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

          else {
            throw new IllegalStateException(src + " exists but is not a directory");
          }
        } catch (FileNotFoundException e) {
          if (!srcFs.mkdirs(p)) {
            throw new HadoopException("Failed to create " + src);
          }
        }
      } catch (IOException ex) {
        throw new HadoopException("Cannot create directory " + ex.getMessage(), ex);
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.