Examples of Slice


Examples of com.backtype.hadoop.datastores.TimeSliceStore.Slice

            sliceStore.openWrite(Utils.weekStartTime(100)-1, Utils.weekStartTime(100));
            fail("should fail!");
        } catch(IllegalArgumentException e) {

        }
        Slice slice = new Slice(Utils.weekStartTime(100), Utils.weekStartTime(100));
        TypedRecordOutputStream os = sliceStore.openWrite(slice);
        os.writeObject("a1");
        os.writeObject("a2");
        os.close();

        try {
            sliceStore.openRead(slice);
            fail("should fail!");
        } catch(IllegalArgumentException e) {

        }
        assertFalse(sliceStore.isSliceExists(slice));
        sliceStore.finishSlice(slice);
        assertTrue(sliceStore.isSliceExists(slice));

        assertSliceContains(sliceStore, slice, "a1", "a2");

        try {
            sliceStore.openWrite(Utils.weekStartTime(99), Utils.weekStartTime(99)+1);
            fail("should fail!");
        } catch(IllegalArgumentException e) {

        }

        Slice slice2 = new Slice(Utils.weekStartTime(100), Utils.weekStartTime(100)+10);
        os = sliceStore.openWrite(slice2);
        os.writeObject("b");
        os.close();
        sliceStore.finishSlice(slice2);
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.charts.PieChart.Slice

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.airlift.slice.Slice

                mask >>>= 1;
            }
            sliceOutput.appendByte(value);
        }

        Slice slice = fixedWidthBlock.getRawSlice();
        sliceOutput
                .appendInt(slice.length())
                .writeBytes(slice);
    }
View Full Code Here

Examples of com.googlecode.charts4j.Slice

    }

    @Test
    public void example1() {
        // EXAMPLE CODE START
        Slice s1 = Slice.newSlice(30, Color.newColor("CACACA"), "Safari", "Apple");
        Slice s2 = Slice.newSlice(30, Color.newColor("DF7417"), "Firefox", "Mozilla");
        Slice s3 = Slice.newSlice(30, Color.newColor("951800"), "Chrome", "Google");
        Slice s4 = Slice.newSlice(10, Color.newColor("01A1DB"), "Internet Explorer", "Microsoft");

        PieChart chart = GCharts.newPieChart(s1, s2, s3, s4);
        chart.setTitle("A Better Web", BLACK, 16);
        chart.setSize(500, 200);
        chart.setThreeD(true);
View Full Code Here

Examples of io.airlift.slice.Slice

        }
        else if (javaType == double.class) {
            type.writeDouble(builder, (Double) value);
        }
        else if (javaType == Slice.class) {
            Slice slice = Slices.utf8Slice((String) value);
            type.writeSlice(builder, slice, 0, slice.length());
        }
        else {
            throw new IllegalArgumentException("bad value: " + value.getClass().getName());
        }
    }
View Full Code Here

Examples of k8.buffer.Slice

     *
     * @param triangle
     *            Triangle to give Slices to
     */
    public void assign(Triangle triangle) {
        Slice slice;
        int elements = vertices.getElements();

        // Add the triangle to the list
        triangles.add(triangle);

View Full Code Here

Examples of net.sf.cram.structure.Slice

    c.blockCount = 1;

    List<Integer> landmarks = new ArrayList<Integer>();
    SliceIO sio = new SliceIO();
    for (int i = 0; i < c.slices.length; i++) {
      Slice s = c.slices[i];
      landmarks.add(baos.size());
      sio.write(s, baos);
      c.blockCount++ ;
      c.blockCount++;
      if (s.embeddedRefBlock != null)
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.slice.Slice

   * Ensure that the given index is valid.
   */
  protected void grow(int index) {
    if ((index * literalSize) + (literalSize - 1) >= data.length()) {
      int newSize = Math.max((index * literalSize) + defaultSize, 2 * data.length());
      Slice newSlice = Slices.allocate(newSize);
      newSlice.setBytes(0, data);
      setData(newSlice);
    }
  }
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

        child.setId(getId()+DOT+key);
        setDiagnosticContext(child);
        child.setMappingDefaults(this.getMappingDefaultsInstance());
        child.setDataCacheManager(this.getDataCacheManagerInstance());
        child.setMetaDataRepository(this.getMetaDataRepositoryInstance());
        Slice slice = new Slice(key, child);
        Log log = getConfigurationLog();
        if (log.isTraceEnabled())
            log.trace(_loc.get("slice-configuration", key, child
                    .toProperties(false)));
        return slice;
View Full Code Here

Examples of org.apache.openjpa.slice.Slice

        for (Object key : newProps.keySet()) {
            if (!String.class.isInstance(key)
             && key.toString().startsWith(prefix))
                throw new UserException(_loc.get("slice-add-wrong-key", key));
        }
        Slice slice = getSlice(name);
        if (slice != null)
            throw new UserException(_loc.get("slice-exists", name));
        Map<String,String> original = super.toProperties(true);
        original.putAll(newProps);
         slice = newSlice(name, original);
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.