Package plan_runner.operators

Examples of plan_runner.operators.AggregateOperator


            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);

          // clearing
          agg.clearStorage();

          _semAgg.release();
        }
      }
  }
View Full Code Here


            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

          try {
            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }
          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);

          // clearing
          agg.clearStorage();

          _semAgg.release();
        }
      }
  }
View Full Code Here

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);

          // clearing
          agg.clearStorage();

          _semAgg.release();
        }
      }
  }
View Full Code Here

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

          try {
            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }
          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

          try {
            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }
          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, _conf), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          if (tuples != null) {
            final String columnDelimiter = MyUtilities.getColumnDelimiter(getConf());
            for (String tuple : tuples) {
              tuple = tuple.replaceAll(" = ", columnDelimiter);
              tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
            }
          }

          // clearing
          agg.clearStorage();

          _semAgg.release();
        }
      }
  }
View Full Code Here

        .getStorage()));
  }

  private static AggregateOperator createOverallAgg(AggregateOperator lastAgg, Map map) {
    final TypeConversion wrapper = lastAgg.getType();
    AggregateOperator overallAgg;

    ColumnReference cr;
    if (lastAgg.hasGroupBy())
      cr = new ColumnReference(wrapper, 1);
    else
      cr = new ColumnReference(wrapper, 0);

    if (lastAgg instanceof AggregateAvgOperator)
      overallAgg = new AggregateAvgOperator(cr, map);
    else
      overallAgg = new AggregateSumOperator(cr, map);

    if (lastAgg.hasGroupBy())
      overallAgg.setGroupByColumns(Arrays.asList(0));

    return overallAgg;
  }
View Full Code Here

TOP

Related Classes of plan_runner.operators.AggregateOperator

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.