Examples of HadoopException


Examples of org.springframework.data.hadoop.HadoopException

    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

Examples of org.springframework.data.hadoop.HadoopException

              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

Examples of org.springframework.data.hadoop.HadoopException

          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

Examples of org.springframework.data.hadoop.HadoopException

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

Examples of org.springframework.data.hadoop.HadoopException

        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

Examples of org.springframework.data.hadoop.HadoopException

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

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

Examples of org.springframework.data.hadoop.HadoopException

          }
          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

Examples of org.springframework.data.hadoop.HadoopException

        }
        else {
          IOUtils.closeStream(srcFs.create(src));
        }
      } catch (IOException ex) {
        throw new HadoopException("Cannot touchz " + uri + ";" + ex.getMessage(), ex);
      }
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.HadoopException

    } catch (ClassNotFoundException e) {
      try {
        clazz = (Class<? extends FileSystem>) Class.forName(
            HFTP_FILESYSTEM_CLASS_NAME_SINCE_V2_3);
      } catch (ClassNotFoundException e1) {
        throw new HadoopException("HftpFileSystem class not available " +
            e1.getMessage(), e1);
      }
    }
    return clazz;
  }
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.