Examples of split()


Examples of org.apache.hadoop.hbase.client.HBaseAdmin.split()

      HRegionInfo hri = location.getRegionInfo();

      // do a regular split
      HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
      byte[] regionName = location.getRegionInfo().getRegionName();
      admin.split(location.getRegionInfo().getRegionName(), Bytes.toBytes("BM"));
      TestEndToEndSplitTransaction.blockUntilRegionSplit(
          TEST_UTIL.getConfiguration(), 60000, regionName, true);

      PairOfSameType<HRegionInfo> daughters = HRegionInfo.getDaughterRegions(meta.get(new Get(regionName)));
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.split()

    table.put(new Put(Bytes.toBytes("row1"))
        .add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes("v1")));
    table.put(new Put(Bytes.toBytes("row2"))
        .add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes("v2")));
    HBaseAdmin admin = UTIL.getHBaseAdmin();
    admin.split(TEST_TABLE);

    // wait for split
    Thread.sleep(10000);

    ListMultimap<String,TablePermission> postperms =
View Full Code Here

Examples of org.apache.hadoop.hbase.util.RegionSplitter.HexStringSplit.split()

    @Test
    public void unitTestHexStringSplit() {
        HexStringSplit splitter = new HexStringSplit();
        // Check splitting while starting from scratch

        byte[][] twoRegionsSplits = splitter.split(2);
        assertEquals(1, twoRegionsSplits.length);
    assertArrayEquals(twoRegionsSplits[0], "80000000".getBytes());

        byte[][] threeRegionsSplits = splitter.split(3);
        assertEquals(2, threeRegionsSplits.length);
View Full Code Here

Examples of org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm.split()

    public void run() {
      long startTime, endTime;
      HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(TABLE_NAME));
      desc.addFamily(new HColumnDescriptor(COLUMN_NAME));
      SplitAlgorithm algo = new RegionSplitter.HexStringSplit();
      byte[][] splits = algo.split(REGION_COUNT);

      LOG.info(String.format("Creating table %s with %d splits.",
        TABLE_NAME, REGION_COUNT));
      startTime = System.currentTimeMillis();
      try {
View Full Code Here

Examples of org.apache.hadoop.hbase.util.RegionSplitter.UniformSplit.split()

    public void unitTestUniformSplit() {
        UniformSplit splitter = new UniformSplit();

        // Check splitting while starting from scratch
        try {
            splitter.split(1);
            throw new AssertionError("Splitting into <2 regions should have thrown exception");
        } catch (IllegalArgumentException e) { }

        byte[][] twoRegionsSplits = splitter.split(2);
        assertEquals(1, twoRegionsSplits.length);
View Full Code Here

Examples of org.apache.hadoop.security.UnixUserGroupInformation.split()

        return;
      }
      rqst.setAttribute("authorized.ugi", ugi);
    } else { // http request, set ugi for servlets, only for testing purposes
      String ugi = rqst.getParameter("ugi");
      rqst.setAttribute("authorized.ugi", new UnixUserGroupInformation(ugi
          .split(",")));
    }

    chain.doFilter(request, response);
  }
View Full Code Here

Examples of org.apache.hadoop.security.UserGroupInformation.split()

      rqst.setAttribute("org.apache.hadoop.hdfsproxy.authorized.userID", userID);
    } else if(rqst.getScheme().equalsIgnoreCase("http")) { // http request, set ugi for servlets, only for testing purposes
      String ugi = rqst.getParameter("ugi");
      if (ugi != null) {
        rqst.setAttribute("authorized.ugi", UserGroupInformation.createRemoteUser(ugi));
        rqst.setAttribute("org.apache.hadoop.hdfsproxy.authorized.userID", ugi.split(",")[0]);
      }
    }
    chain.doFilter(request, response);
  }
View Full Code Here

Examples of org.apache.james.mailbox.model.MessageRange.split()

    }
   
    @Test
    public void testSplitOne() {
        MessageRange one = MessageRange.one(1);
        List<MessageRange> ranges = one.split(2);
        assertEquals(1, ranges.size());
        checkRange(1, 1, ranges.get(0));
        assertEquals(MessageRange.Type.ONE, ranges.get(0).getType());
    }
   
View Full Code Here

Examples of org.apache.oro.text.perl.Perl5Util.split()

      String line = null;
      while ((line = bufferedReader.readLine()) != null) {
        final Perl5Util util = new Perl5Util();
        final List<String> rankStrings = new ArrayList<String>();
        util.split(rankStrings, "/\\s*,\\s*/", line);

        int product = 1;
        // First 5 columns are card ranks
        for (int i = 0; i < 5; i++) {
          product *= Rank.valueOf(rankStrings.get(i)).getPrime();
View Full Code Here

Examples of org.apache.pdfbox.util.Splitter.split()

                    {
                        splitter.setSplitAtPage(1);
                    }
                }
                   
                documents = splitter.split( document );
                for( int i=0; i<documents.size(); i++ )
                {
                    PDDocument doc = documents.get( i );
                    String fileName = pdfFile.substring(0, pdfFile.length()-4 ) + "-" + i + ".pdf";
                    writeDocument( doc, fileName );
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.