Package backtype.storm.utils

Examples of backtype.storm.utils.BufferFileInputStream


  }

  @Override
  public String beginFileDownload(String file) throws TException {
    BufferFileInputStream is = null;
    String id = null;
    try {
      int bufferSize = JStormUtils
          .parseInt(conf.get(Config.NIMBUS_THRIFT_MAX_BUFFER_SIZE),
              1024 * 1024) / 2;

      is = new BufferFileInputStream(file, bufferSize);
      id = UUID.randomUUID().toString();
      data.getDownloaders().put(id, is);
    } catch (FileNotFoundException e) {
      LOG.error(e + "file:" + file + " not found");
      throw new TException(e);
View Full Code Here


    }

    try {
      if (obj instanceof BufferFileInputStream) {

        BufferFileInputStream is = (BufferFileInputStream) obj;
        byte[] ret = is.read();
        if (ret != null) {
          downloaders.put(id, (BufferFileInputStream) is);
          return ByteBuffer.wrap(ret);
        }
      } else {
View Full Code Here

TOP

Related Classes of backtype.storm.utils.BufferFileInputStream

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.