Tabnine Logo
Pair
Code IndexAdd Tabnine to your IDE (free)

How to use
Pair
in
org.apache.crunch

Best Java code snippets using org.apache.crunch.Pair (Showing top 20 results out of 315)

origin: org.apache.crunch/crunch-core

 @Override
 public Pair<V2, V1> map(Pair<V1, V2> input) {
  if (input == null) {
   return null;
  }
  return Pair.of(input.second(), input.first());
 }
}
origin: cloudera/crunch

 @Override  
 public int compareTo(Pair<K, V> o) {
  int diff = cmp(first, o.first);
  if (diff == 0) {
   diff = cmp(second, o.second);
  }
  return diff;
 }
}
origin: org.apache.crunch/crunch-core

 @Override
 public Double map(Pair<Double, Long> input) {
  return input.first() / input.second();
 }
}, ptf.doubles());
origin: cloudera/crunch

 @Override
 public Pair makeTuple(Object... values) {
  return Pair.of(values[0], values[1]);
 }
};
origin: cloudera/crunch

 @Override
 public void process(Pair<T, Void> input, Emitter<T> emitter) {
  emitter.emit(input.first());
 }
}, collection.getPType());
origin: org.apache.crunch/crunch-core

 @Override
 public Pair<U, V> map(Pair<Pair<Integer, Integer>, Pair<U, V>> input) {
  return input.second();
 }
}, ctf.pairs(left.getPType(), right.getPType()));
origin: apache/crunch

 @Override
 public void process(Pair<ImmutableBytesWritable, Result> row, Emitter<Pair<String, String>> emitter) {
  byte[] type = row.second().getValue(COLUMN_FAMILY_SOURCE, COLUMN_QUALIFIER_SOURCE_PLAY);
  byte[] def = row.second().getValue(COLUMN_FAMILY_SOURCE, COLUMN_QUALIFIER_SOURCE_QUOTE);
  if (type != null && def != null) {
   emitter.emit(new Pair<String, String>(Bytes.toString(type), Bytes.toString(def)));
  }
 }
}, Writables.tableOf(Writables.strings(), Writables.strings()));
origin: spotify/crunch-lib

 @Override
 public Double map(Pair<Double, Long> input) {
  return input.first() / input.second();
 }
}, ptf.doubles());
origin: cloudera/crunch

 @Override
 public Pair<V, U> map(V v) {
  return Pair.of(v, null);
 }
}
origin: cloudera/crunch

 @Override
 public void process(Pair<Tuple4<V1, V2, V3, V4>, Void> input,
   Emitter<Tuple4<V1, V2, V3, V4>> emitter) {
  emitter.emit(input.first());
 }
}, collection.getPType());
origin: org.apache.crunch/crunch

 @Override
 public V apply(Pair<SK, V> input) {
  return input.second();
 }
}));
origin: org.apache.crunch/crunch-core

 @Override
 public Pair<Integer, T> map(Pair<Integer, Pair<Double, T>> p) {
  return Pair.of(p.first(), p.second().second());
 }
}, ptf.pairs(ptf.ints(), ttype));
origin: org.apache.crunch/crunch

 /**
  * Split up the input record to make coding a bit more manageable.
  * 
  * @param input The input record.
  * @param emitter The emitter to send the output to.
  */
 @Override
 public void process(Pair<Pair<K, Integer>, Iterable<Pair<U, V>>> input,
   Emitter<Pair<K, Pair<U, V>>> emitter) {
  join(input.first().first(), input.first().second(), input.second(), emitter);
 }
}
origin: org.apache.crunch/crunch

 @Override
 public Pair<V, U> map(V v) {
  return Pair.of(v, null);
 }
}
origin: org.apache.crunch/crunch-core

 @Override
 public void process(Pair<K, V> input, Emitter<K> emitter) {
  emitter.emit(input.first());
 }
}, ptable.getKeyType());
origin: org.apache.crunch/crunch-core

 @Override
 public T map(Pair<Integer, T> p) {
  return p.second();
 }
}, (PType<T>) input.getPType().getSubTypes().get(0));
origin: org.apache.crunch/crunch

 @Override
 public int compareTo(Pair<K, V> o) {
  int diff = cmp(first, o.first);
  if (diff == 0) {
   diff = cmp(second, o.second);
  }
  return diff;
 }
}
origin: org.apache.crunch/crunch-core

 @Override
 public Pair<K, Long> map(Pair<K, Long> input) {
  return Pair.of(input.first(), -input.second());
 }
}, table.getPTableType());
origin: cloudera/crunch

 /**
  * Split up the input record to make coding a bit more manageable.
  *
  * @param input The input record.
  * @param emitter The emitter to send the output to.
  */
 @Override
 public void process(Pair<Pair<K, Integer>, Iterable<Pair<U, V>>> input,
   Emitter<Pair<K, Pair<U, V>>> emitter) {
  join(input.first().first(), input.first().second(), input.second(), emitter);
 }
}
origin: org.apache.crunch/crunch

 @Override
 public Pair<K, Iterable<V>> convertIterableInput(K key, Iterable<V> value) {
  return Pair.of(key, value);
 }
}
org.apache.crunchPair

Javadoc

A convenience class for two-element Tuples.

Most used methods

  • of
  • second
  • first
  • <init>
  • cmp

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now