Package java.util.stream

Examples of java.util.stream.Collectors$Partition


  public Partition execute(Partition iPart)
      throws WindowingException
  {
    PartitionIterator<Object> pItr = iPart.iterator();
    RuntimeUtils.connectLeadLagFunctionsToPartition(qDef, pItr);
    Partition outP = new Partition(getPartitionClass(),
        getPartitionMemSize(), tDef.getSerde(), OI);
    execute(pItr, outP);
    return outP;
  }
View Full Code Here


 
  protected void processInputPartition() throws HiveException
  {
    try
    {
      Partition outPart = Executor.executeChain(qDef, inputPart);
      Executor.executeSelectList(qDef, outPart, new ForwardPTF());
    }
    catch (WindowingException we)
    {
      throw new HiveException("Cannot close PTFOperator.", we);
View Full Code Here

  protected void processMapFunction() throws HiveException
  {
    try
    {
      TableFuncDef tDef = RuntimeUtils.getFirstTableFunction(qDef);
      Partition outPart = tDef.getFunction().transformRawInput(inputPart);
      PartitionIterator<Object> pItr = outPart.iterator();
      while (pItr.hasNext())
      {
        Object oRow = pItr.next();
        forward(oRow, outputObjInspector);
      }
View Full Code Here

    try
    {
      SerDe serDe = (SerDe) wIn.getDeserializer();
      StructObjectInspector oI = (StructObjectInspector) serDe
          .getObjectInspector();
      Partition p = new Partition(partitionClass, partitionMemSize,
          serDe, oI);
      Writable w = wIn.createRow();
      while( wIn.next(w) != -1)
      {
        p.append(w);
      }
      return p;
    }
    catch (WindowingException we)
    {
View Full Code Here

  @SuppressWarnings({ "unchecked", "rawtypes" })
  @Override
  public void execute(PartitionIterator<Object> pItr, Partition outP) throws WindowingException
  {
    ArrayList<List<?>> oColumns = new ArrayList<List<?>>();
    Partition iPart = pItr.getPartition();
    StructObjectInspector inputOI;
    try {
      inputOI = (StructObjectInspector) iPart.getSerDe().getObjectInspector();
    } catch (SerDeException se) {
      throw new WindowingException(se);
    }
   
    try
    {
      for(WindowFunctionDef wFn : wFnDefs)
      {
        boolean processWindow = wFn.getWindow() != null;
        pItr.reset();
        if ( !processWindow )
        {
          GenericUDAFEvaluator fEval = wFn.getEvaluator();
          Object[] args = new Object[wFn.getArgs().size()];
          AggregationBuffer aggBuffer = fEval.getNewAggregationBuffer();
          while(pItr.hasNext())
          {
            Object row = pItr.next();
            int i =0;
            for(ArgDef arg : wFn.getArgs())
            {
              args[i++] = arg.getExprEvaluator().evaluate(row);
            }
            fEval.aggregate(aggBuffer, args);
          }
          Object out = fEval.evaluate(aggBuffer);
          WindowFunctionInfo wFnInfo = FunctionRegistry.getWindowFunctionInfo(wFn.getSpec().getName());
          if ( !wFnInfo.isPivotResult())
          {
            out = new SameList(iPart.size(), out);
          }
          oColumns.add((List<?>)out);
        }
        else
        {
          oColumns.add(executeFnwithWindow(getQueryDef(), wFn, iPart));
        }
      }
     
      for(int i=0; i < iPart.size(); i++)
      {
        ArrayList oRow = new ArrayList();
        Object iRow = iPart.getAt(i);
       
        for(StructField f : inputOI.getAllStructFieldRefs())
        {
          oRow.add(inputOI.getStructFieldData(iRow, f));
        }
View Full Code Here

                deleteButton.setEnabled( !event.getSelection().isEmpty() );
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( partition.isSystemPartition() )
                    {
                        deleteButton.setEnabled( false );
                    }
                }
            }
        } );

        addButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                Partition newPartition = new Partition( getNewId() );

                // Default values
                newPartition.setCacheSize( 100 );
                newPartition.setEnableOptimizer( true );
                newPartition.setSynchronizationOnWrite( true );
                List<IndexedAttribute> indexedAttributes = new ArrayList<IndexedAttribute>();
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.1", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.2", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.3", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.4", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.5", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.6", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.7", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "dc", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "ou", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "krb5PrincipalName", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "uid", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "objectClass", 100 ) ); //$NON-NLS-1$
                newPartition.setIndexedAttributes( indexedAttributes );

                partitions.add( newPartition );
                viewer.refresh();
                viewer.setSelection( new StructuredSelection( newPartition ) );
                setEditorDirty();
            }
        } );

        deleteButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( !partition.isSystemPartition() )
                    {
                        partitions.remove( partition );
                        viewer.refresh();
                        setEditorDirty();
                    }
View Full Code Here

                deleteButton.setEnabled( !event.getSelection().isEmpty() );
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( partition.isSystemPartition() )
                    {
                        deleteButton.setEnabled( false );
                    }
                }
            }
        } );

        addButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                Partition newPartition = new Partition( getNewId() );

                // Default values
                newPartition.setCacheSize( 100 );
                newPartition.setEnableOptimizer( true );
                newPartition.setSynchronizationOnWrite( true );
                List<IndexedAttribute> indexedAttributes = new ArrayList<IndexedAttribute>();
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.1", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.2", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.3", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.4", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.5", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.6", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.7", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "dc", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "ou", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "krb5PrincipalName", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "uid", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "objectClass", 100 ) ); //$NON-NLS-1$
                newPartition.setIndexedAttributes( indexedAttributes );

                partitions.add( newPartition );
                viewer.refresh();
                viewer.setSelection( new StructuredSelection( newPartition ) );
                setEditorDirty();
            }
        } );

        deleteButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( !partition.isSystemPartition() )
                    {
                        partitions.remove( partition );
                        viewer.refresh();
                        setEditorDirty();
                    }
View Full Code Here

                deleteButton.setEnabled( !event.getSelection().isEmpty() );
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( partition.isSystemPartition() )
                    {
                        deleteButton.setEnabled( false );
                    }
                }
            }
        } );

        addButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                Partition newPartition = new Partition( getNewId() );
                partitions.add( newPartition );
                viewer.refresh();
                viewer.setSelection( new StructuredSelection( newPartition ) );
                setEditorDirty();
            }
        } );

        deleteButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( !partition.isSystemPartition() )
                    {
                        partitions.remove( partition );
                        viewer.refresh();
                        setEditorDirty();
                    }
View Full Code Here

                deleteButton.setEnabled( !event.getSelection().isEmpty() );
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( partition.isSystemPartition() )
                    {
                        deleteButton.setEnabled( false );
                    }
                }
            }
        } );

        addButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                Partition newPartition = new Partition( getNewId() );

                // Default values
                newPartition.setCacheSize( 100 );
                newPartition.setEnableOptimizer( true );
                newPartition.setSynchronizationOnWrite( true );
                List<IndexedAttribute> indexedAttributes = new ArrayList<IndexedAttribute>();
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.1", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.2", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.3", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.4", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.5", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.6", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.7", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "dc", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "ou", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "krb5PrincipalName", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "uid", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "objectClass", 100 ) ); //$NON-NLS-1$
                newPartition.setIndexedAttributes( indexedAttributes );

                partitions.add( newPartition );
                viewer.refresh();
                viewer.setSelection( new StructuredSelection( newPartition ) );
                setEditorDirty();
            }
        } );

        deleteButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( !partition.isSystemPartition() )
                    {
                        partitions.remove( partition );
                        viewer.refresh();
                        setEditorDirty();
                    }
View Full Code Here

                deleteButton.setEnabled( !event.getSelection().isEmpty() );
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( partition.isSystemPartition() )
                    {
                        deleteButton.setEnabled( false );
                    }
                }
            }
        } );

        addButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                Partition newPartition = new Partition( getNewId() );

                // Default values
                newPartition.setCacheSize( 100 );
                newPartition.setEnableOptimizer( true );
                newPartition.setSynchronizationOnWrite( true );
                List<IndexedAttribute> indexedAttributes = new ArrayList<IndexedAttribute>();
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.1", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.2", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.3", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.4", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.5", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.6", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "1.3.6.1.4.1.18060.0.4.1.2.7", 10 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "dc", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "ou", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "krb5PrincipalName", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "uid", 100 ) ); //$NON-NLS-1$
                indexedAttributes.add( new IndexedAttribute( "objectClass", 100 ) ); //$NON-NLS-1$
                newPartition.setIndexedAttributes( indexedAttributes );

                partitions.add( newPartition );
                viewer.refresh();
                viewer.setSelection( new StructuredSelection( newPartition ) );
                setEditorDirty();
            }
        } );

        deleteButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( !partition.isSystemPartition() )
                    {
                        partitions.remove( partition );
                        viewer.refresh();
                        setEditorDirty();
                    }
View Full Code Here

TOP

Related Classes of java.util.stream.Collectors$Partition

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.