Package org.apache.hadoop.hive.ql.exec.persistence

Examples of org.apache.hadoop.hive.ql.exec.persistence.MapJoinTableContainer$ReusableGetAdaptor


        // get tmp file URI
        String tmpURI = this.getExecContext().getLocalWork().getTmpFileURI();
        LOG.info("Temp URI for side table: " + tmpURI);
        for (byte tag = 0; tag < mapJoinTables.length; tag++) {
          // get the key and value
          MapJoinTableContainer tableContainer = mapJoinTables[tag];
          if (tableContainer == null) {
            continue;
          }
          // get current input file name
          String bigBucketFileName = getExecContext().getCurrentBigBucketFile();
          String fileName = getExecContext().getLocalWork().getBucketFileName(bigBucketFileName);
          // get the tmp URI path; it will be a hdfs path if not local mode
          String dumpFilePrefix = conf.getDumpFilePrefix();
          String tmpURIPath = Utilities.generatePath(tmpURI, dumpFilePrefix, tag, fileName);
          console.printInfo(Utilities.now() + "\tDump the side-table into file: " + tmpURIPath);
          // get the hashtable file and path
          Path path = new Path(tmpURIPath);
          FileSystem fs = path.getFileSystem(hconf);
          ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(fs.create(path), 4096));
          try {
            mapJoinTableSerdes[tag].persist(out, tableContainer);
          } finally {
            out.close();
          }
          tableContainer.clear();
          console.printInfo(Utilities.now() + "\tUpload 1 File to: " + tmpURIPath);
        }
      }
      super.closeOp(abort);
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.exec.persistence.MapJoinTableContainer$ReusableGetAdaptor

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.