Examples of BlockInfo


Examples of com.asakusafw.runtime.directio.hadoop.BlockInfo

    private BlockMap blocks(String path, long... blockSizes) {
        List<BlockInfo> blockList = new ArrayList<BlockInfo>();
        long totalSize = 0;
        for (long blockSize : blockSizes) {
            long next = totalSize + blockSize;
            blockList.add(new BlockInfo(totalSize, next, null));
            totalSize = next;
        }
        return BlockMap.create(path, totalSize, blockList, false);
    }
View Full Code Here

Examples of dijjer.io.BlockInfo

      int uid = Misc.nextInt();
      Dispatcher.getDispatcher().registerUid(uid);
      VeryLongInteger checkHash = null;
      try {
        checkHash = Dispatcher.getDispatcher().retrieveHash(
            new BlockInfo(_url, _length, _lastModified, blockNo), 10, uid, false);
      } catch (Exception e) {
        Logger.warning("Failed to retrieve hash " + e.getMessage());
      }
      Dispatcher.getDispatcher().unregisterUid(uid);
      if (checkHash != null) {
        _retrievedHashes.put(new Integer(blockNo), checkHash);
      }
      Logger.info("Done with retrieval of hash " + blockNo);
    } else {
      PartiallyReceivedBlock block;
      BlockInfo bi;
      synchronized (this) {
        blockNo = _nextBlockToDownload++;
        bi = new BlockInfo(_url, _length, _lastModified, blockNo);
        block = new PartiallyReceivedBlock(Dijjer.PACKETS_IN_BLOCK, Dijjer.PACKET_SIZE);
        _pending.addLast(new BlockPair(bi, block));
        this.notify();
      }
      try {
        // If the remote transfer fails we don't want the transfer to the client to be aborted, rather
        // we want to rerequest with TTL of 0, so we tell the PartiallyRetrievedBlock to ignore any
        // abort
        block.setIgnoreAbort(true);
        if (Dispatcher.getDispatcher().retrieveData(bi, 15, block, this)) {
          _fromCacheCount++;
        }
        block.setIgnoreAbort(false);
      } catch (Exception e) {
        Logger.warning("Error during download of block " + blockNo + ": " + e.getMessage());
        try {
          Logger.info("Retrying block " + blockNo + " with TTL of 0");
          Dispatcher.getDispatcher().retrieveData(new BlockInfo(_url, _length, _lastModified, blockNo), 0,
              block, this);
        } catch (Exception e1) {
          Logger.error("Error during direct download of block " + blockNo + ", aborting", e1);
          this.abort();
        }
View Full Code Here

Examples of mekanism.api.BlockInfo

    }

    Coord4D coord = tileEntity.getStartingCoord();
    int diameter = tileEntity.getDiameter();
    int size = tileEntity.getTotalSize();
    BlockInfo info = new BlockInfo(null, 0);

    for(int i = 0; i < size; i++)
    {
      int x = coord.xCoord+i%diameter;
      int z = coord.zCoord+(i/diameter)%diameter;
View Full Code Here

Examples of nallar.tickthreading.util.BlockInfo

        tileMap.remove(position);
        worldObj.loadedTileEntityList.remove(tileEntity);
        int x = position.x, y = position.y, z = position.z;
        int id = getBlockID(x, y, z);
        int meta = getBlockMetadata(x, y, z);
        Log.info("Resetting invalid TileEntity " + Log.toString(tileEntity) + " for block: " + new BlockInfo(id, meta) + " at within chunk coords " + x + ',' + y + ',' + z + " in chunk " + this);
        setBlockIDWithMetadata(x, y, z, 0, 0);
        setBlockIDWithMetadata(x, y, z, id, meta);
      }
    }
  }
View Full Code Here

Examples of org.apache.avalon.phoenix.metainfo.BlockInfo

    {
        final boolean disableProxy = component.isDisableProxy();
        final DependencyMetaData[] dependencies =
            toPhoenixDependencys( component.getDependencies() );

        final BlockInfo blockInfo = ComponentInfoConverter.toBlockInfo( info );
        return new BlockMetaData( component.getName(),
                                  dependencies,
                                  disableProxy,
                                  blockInfo );
    }
View Full Code Here

Examples of org.apache.batik.gvt.flow.BlockInfo

        List  fontFamilyList = getFontFamilyList(element, ctx);

        String ln = element.getLocalName();
        boolean rgnBr;
        rgnBr = ln.equals(SVG12Constants.SVG_FLOW_REGION_BREAK_TAG);
        return new BlockInfo(top, right, bottom, left, indent, textAlign,
                             lineHeight, fontFamilyList, fontAttrs,
                             rgnBr);
    }
View Full Code Here

Examples of org.apache.flex.forks.batik.gvt.flow.BlockInfo

        List  fontFamilyList = getFontFamilyList(element, ctx);

        String ln = element.getLocalName();
        boolean rgnBr;
        rgnBr = ln.equals(SVG12Constants.SVG_FLOW_REGION_BREAK_TAG);
        return new BlockInfo(top, right, bottom, left, indent, textAlign,
                             lineHeight, fontFamilyList, fontAttrs,
                             rgnBr);
    }
View Full Code Here

Examples of org.apache.hadoop.dfs.BlocksMap.BlockInfo

    synchronized (rootDir) {
      INodeFile fileNode = (INodeFile) file;

      // associate the new list of blocks with this file
      namesystem.blocksMap.addINode(block, fileNode);
      BlockInfo blockInfo = namesystem.blocksMap.getStoredBlock(block);
      fileNode.addBlock(blockInfo);

      NameNode.stateChangeLog.debug("DIR* FSDirectory.addFile: "
                                    + path + " with " + block
                                    + " block is added to the in-memory "
View Full Code Here

Examples of org.apache.hadoop.dfs.BlocksMap.BlockInfo

    synchronized (rootDir) {
      INodeFile fileNode = (INodeFile) file;

      // associate the new list of blocks with this file
      namesystem.blocksMap.addINode(block, fileNode);
      BlockInfo blockInfo = namesystem.blocksMap.getStoredBlock(block);
      fileNode.addBlock(blockInfo);

      NameNode.stateChangeLog.debug("DIR* FSDirectory.addFile: "
                                    + path + " with " + block
                                    + " block is added to the in-memory "
View Full Code Here

Examples of org.apache.hadoop.dfs.BlocksMap.BlockInfo

    synchronized (rootDir) {
      INodeFile fileNode = (INodeFile) file;

      // associate the new list of blocks with this file
      namesystem.blocksMap.addINode(block, fileNode);
      BlockInfo blockInfo = namesystem.blocksMap.getStoredBlock(block);
      fileNode.addBlock(blockInfo);

      NameNode.stateChangeLog.debug("DIR* FSDirectory.addFile: "
                                    + path + " with " + block
                                    + " block is added to the in-memory "
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.