本文整理了Java中org.apache.pig.data.Tuple.compareTo()
方法的一些代码示例,展示了Tuple.compareTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tuple.compareTo()
方法的具体详情如下:
包路径:org.apache.pig.data.Tuple
类名称:Tuple
方法名:compareTo
暂无
代码示例来源:origin: org.apache.pig/pig
@Override
@SuppressWarnings("unchecked")
public int compareTo(TContainer other) {
return tuple.compareTo(other.tuple);
}
代码示例来源:origin: org.apache.pig/pig
@Override
@SuppressWarnings("unchecked")
public int compare(Tuple t1, Tuple t2) {
return t1.compareTo(t2);
}
代码示例来源:origin: org.apache.pig/pig
@Override
@SuppressWarnings("unchecked")
public int compareTo(TContainer other) {
return tuple.compareTo(other.tuple);
}
代码示例来源:origin: org.apache.pig/pig
@Override
@SuppressWarnings("unchecked")
public int compareTo(Object o) {
return t.compareTo(o);
}
}
代码示例来源:origin: org.apache.pig/pig
@Override
@SuppressWarnings("unchecked")
public int compare(Tuple t1, Tuple t2) {
return t1.compareTo(t2);
}
代码示例来源:origin: org.apache.pig/pig
@Override
@SuppressWarnings("unchecked")
public int compareTo(Object o) {
return t.compareTo(o);
}
代码示例来源:origin: org.apache.pig/pig
@Override
@SuppressWarnings("unchecked")
public int compare(Tuple t1, Tuple t2) {
return t1.compareTo(t2);
}
代码示例来源:origin: com.linkedin.datafu/datafu
@Override
public int compareTo(pair o)
{
return this.data.compareTo(o.data);
}
}
代码示例来源:origin: com.linkedin.datafu/datafu
@SuppressWarnings("unchecked")
@Override
public int compareTo(Pair o)
{
int r = this.data.compareTo(o.data);
if (r == 0)
{
return index.compareTo(o.index);
}
else
{
return r;
}
}
代码示例来源:origin: com.linkedin.datafu/datafu
@SuppressWarnings("unchecked")
public Tuple next()
{
Tuple nextData = it.next();
// algorithm assumes data is in order
if (data.compareTo(nextData) > 0)
{
throw new RuntimeException("Out of order!");
}
this.data = nextData;
return this.data;
}
代码示例来源:origin: com.twitter.elephantbird/elephant-bird-pig
@SuppressWarnings("unchecked")
@Override
public int compareTo(Object arg0) {
convertAll();
return realTuple.compareTo(arg0);
}
代码示例来源:origin: com.linkedin.datafu/datafu
if (pq.peek().data.compareTo(last_data) != 0 && all_equal(pq)) {
last_data = pq.peek().data;
outputBag.add(last_data);
Tuple nextData = p.it.next();
if (p.data.compareTo(nextData) > 0)
代码示例来源:origin: org.apache.pig/pig
return ((Tuple)o1).compareTo(o2);
代码示例来源:origin: org.apache.pig/pig
switch (mState) {
case ALL_ASC:
return t1.compareTo(t2);
return t2.compareTo(t1);
代码示例来源:origin: org.apache.pig/pig
@SuppressWarnings("unchecked")
@Override
public int compareTo(Object other) {
if (this == other)
return 0;
if (other instanceof DataBag) {
DataBag bOther = (DataBag) other;
if (this.size() != bOther.size()) {
if (this.size() > bOther.size()) return 1;
else return -1;
}
// if we got this far, both bags should have same size
// make a LimitedSortedBag for the other bag with same comparator and limit
// so that both bag are sorted and we can loop through both iterators
DataBag otherCloneDataBag = new LimitedSortedDataBag(mComp, limit);
otherCloneDataBag.addAll((DataBag) other);
Iterator<Tuple> thisIt = this.iterator();
Iterator<Tuple> otherIt = otherCloneDataBag.iterator();
while (thisIt.hasNext() && otherIt.hasNext()) {
Tuple thisT = thisIt.next();
Tuple otherT = otherIt.next();
int c = thisT.compareTo(otherT);
if (c != 0) return c;
}
return 0; // if we got this far, they must be equal
} else {
return DataType.compare(this, other);
}
}
代码示例来源:origin: org.apache.pig/pig
Tuple otherT = otherIt.next();
int c = thisT.compareTo(otherT);
if (c != 0) return c;
代码示例来源:origin: com.linkedin.datafu/datafu
if (nextPair.data.compareTo(lastData) != 0)
代码示例来源:origin: edu.umd/cloud9
@SuppressWarnings("unchecked")
public int compare(PairOfWritables<Tuple, FloatWritable> e1,
PairOfWritables<Tuple, FloatWritable> e2) {
if (e1.getRightElement().compareTo(e2.getRightElement()) == 0) {
return e1.getLeftElement().compareTo(e2.getLeftElement());
}
return e2.getRightElement().compareTo(e1.getRightElement());
}
});
代码示例来源:origin: org.apache.pig/pig
Tuple otherT = otherIt.next();
int c = thisT.compareTo(otherT);
if (c != 0) return c;
代码示例来源:origin: edu.umd/cloud9
@SuppressWarnings("unchecked")
public int compare(PairOfWritables<Tuple, FloatWritable> e1,
PairOfWritables<Tuple, FloatWritable> e2) {
if (e1.getRightElement().compareTo(e2.getRightElement()) == 0) {
return e1.getLeftElement().compareTo(e2.getLeftElement());
}
return e2.getRightElement().compareTo(e1.getRightElement());
}
});
内容来源于网络,如有侵权,请联系作者删除!