Examples of copy()


Examples of org.apache.hadoop.hdfs.tools.FastCopy.copy()

    util.createFiles(fs, topDir);
    FastCopy fastCopy = new FastCopy(conf);
    cluster.shutdownDataNode(0, true);
    try {
      for (String fileName : util.getFileNames(topDir)) {
        fastCopy.copy(fileName, fileName + "dst", (DistributedFileSystem) fs,
            (DistributedFileSystem) fs);
      }
      Map<DatanodeInfo, Integer> dnErrors = fastCopy.getDatanodeErrors();
      assertEquals(1, dnErrors.size());
      int errors = dnErrors.values().iterator().next();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.MapJoinRowContainer.copy()

      if (rowNumber > hashTableScale && rowNumber % hashTableScale == 0) {
        memoryExhaustionHandler.checkMemoryStatus(tableContainer.size(), rowNumber);
      }
      tableContainer.put(key, rowContainer);
    } else if (rowContainer == EMPTY_ROW_CONTAINER) {
      rowContainer = rowContainer.copy();
      rowContainer.add(value);
      tableContainer.put(key, rowContainer);
    } else {
      rowContainer.add(value);
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.optimizer.optiq.reloperators.HiveAggregateRel.copy()

        ImmutableList.of(intType), longType);
    // TODO: Using 0 might be wrong; might need to walk down to find the
    // proper index of a dummy.
    List<Integer> argList = ImmutableList.of(0);
    AggregateCall dummyCall = new AggregateCall(countFn, false, argList, longType, null);
    AggregateRelBase newAggRel = oldAggRel.copy(oldAggRel.getTraitSet(), oldAggRel.getChild(),
        oldAggRel.getGroupSet(), ImmutableList.of(dummyCall));
    RelNode select = introduceDerivedTable(newAggRel);
    parent.replaceInput(0, select);
  }
}
View Full Code Here

Examples of org.apache.hadoop.mrunit.internal.io.Serialization.copy()

      for (InputSplit inputSplit : inputSplits) {
        RecordReader<K, V> recordReader = inputFormat.createRecordReader(
            inputSplit, taskAttemptContext);
        recordReader.initialize(inputSplit, taskAttemptContext);
        while (recordReader.nextKeyValue()) {
          outputs.add(new Pair<K, V>(serialization.copy(recordReader
              .getCurrentKey()), serialization.copy(recordReader
              .getCurrentValue())));
        }
      }
    } catch (InterruptedException e) {
View Full Code Here

Examples of org.apache.harmony.awt.nativebridge.Int8Pointer.copy()

                return itemId;
            }
            final int childSize = getItemIDListSize(itemId);
            Int8Pointer resPtr = nb.createInt8Pointer(parentSize + childSize, true); //!!! should be in native mem

            resPtr.copy(parentAbsoluteItemId, 0, parentSize);
            resPtr.copy(itemId, parentSize, childSize);

            return win32.createITEMIDLIST(resPtr);
        }
View Full Code Here

Examples of org.apache.hcatalog.data.HCatRecord.copy()

  public void testCopy() throws Exception {
    HCatRecord r = new LazyHCatRecord(getHCatRecord(), getObjectInspector());
    boolean sawException = false;
    try {
      r.copy(null);
    } catch (UnsupportedOperationException uoe) {
      sawException = true;
    }
    assertTrue(sawException);
  }
View Full Code Here

Examples of org.apache.isis.core.runtime.userprofile.Options.copy()

    }

    @Test
    public void copy() throws Exception {
        final Options copy = new Options();
        copy.copy(options);
        assertEquals("value", copy.getString("test"));
    }

    @Test
    public void addOptions() throws Exception {
View Full Code Here

Examples of org.apache.isis.core.runtime.userprofile.UserProfile.copy()

        return profile;
    }

    private UserProfile createProfileFromTemplate(final String userName, final UserProfile template) {
        final UserProfile userProfile = new UserProfile();
        userProfile.copy(template);
        LOG.info("creating UserProfile, from template, for " + userName);
        return userProfile;
    }

    // //////////////////////////////////////////////////////
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.Workspace.copy()

    public void testCopy() throws RepositoryException {
        Workspace wsp = (Workspace) superuser.getWorkspace();
        VersionManager vMgr = wsp.getVersionManager();
        String srcPath = versionableNode.getPath();
        String dstPath = getProperty("destination");
        wsp.copy(srcPath, dstPath);

        // check versionable
        Node v = (Node) ((org.apache.jackrabbit.api.jsr283.Session) superuser).getNode(dstPath);
        assertTrue("Copied Node.isNodeType(mix:simpleVersionable) must return true.",
                v.isNodeType(mixSimpleVersionable));
View Full Code Here

Examples of org.apache.jackrabbit.core.RepositoryCopier.copy()

        }

        message("Creating a repository copy in " + targetDir);

        RepositoryCopier copier = new RepositoryCopier(source, target);
        copier.copy();

        message("The repository has been successfully copied.");
    }

    private void prepareServerLog(File log)
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.