Package org.springframework.data.hadoop

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


      }

      return Collections.unmodifiableCollection(results);

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

          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

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

              if (srcFstatus.isDir() && !dstFstatus.isDir()) {
                throw new IllegalArgumentException("cannot overwrite non directory " + dstPath
                    + " with directory " + s);
              }
            }
            throw new HadoopException("Failed to rename " + s + " to " + dstPath);
          }
        }
      }
    } catch (IOException ex) {
      throw new HadoopException("Cannot rename resources " + ex.getMessage(), ex);
    }
  }
View Full Code Here

          if (!skipTrash) {
            try {
              Trash trashTmp = new Trash(srcFs, configuration);
              trashTmp.moveToTrash(p);
            } catch (IOException ex) {
              throw new HadoopException("Cannot move to Trash resource " + p, ex);
            }
          }
          srcFs.delete(p, recursive);
        }
      } catch (IOException ex) {
        throw new HadoopException("Cannot delete (all) resources " + ex.getMessage(), ex);
      }
    }
  }
View Full Code Here

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

        if (waitList != null) {
          waitList.add(src);
        }
      }
      else {
        throw new HadoopException("Cannot set replication for " + src);
      }
    }
    else {
      if (recursive) {
        FileStatus items[] = srcFs.listStatus(src);
View Full Code Here

        result &= srcFs.getFileStatus(f).isDir();
      }

      return result;
    } catch (IOException ex) {
      throw new HadoopException("Cannot test resource " + uri + ";" + ex.getMessage(), ex);
    }
  }
View Full Code Here

          }
          i.seek(0);
          texts.add(getContent(in));
        }
      } catch (IOException ex) {
        throw new HadoopException("Cannot read " + uri + ";" + ex.getMessage(), ex);
      } finally {
        IOUtils.closeStream(in);
        IOUtils.closeStream(i);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.hadoop.HadoopException

Copyright © 2018 www.massapicom. 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.