Codota Logo
PartitionOperationConfig.getPartitionSpecs
Code IndexAdd Codota to your IDE (free)

How to use
getPartitionSpecs
method
in
com.nextdoor.bender.partition.PartitionOperationConfig

Best Java code snippets using com.nextdoor.bender.partition.PartitionOperationConfig.getPartitionSpecs (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: Nextdoor/bender

 @Override
 public PartitionOperation newInstance() {
  return new PartitionOperation(this.config.getPartitionSpecs());
 }
}
origin: Nextdoor/bender

 @Override
 public PartitionOperation newInstance() {
  return new PartitionOperation(this.config.getPartitionSpecs());
 }
}
origin: Nextdoor/bender

@Test
public void testLoadConfg() {
 BenderConfig config = BenderConfig.load("/com/nextdoor/bender/partition/partition_config.json");
 PartitionOperationConfig op =
   (PartitionOperationConfig) config.getSources().get(0).getOperationConfigs().get(0);
 PartitionSpec spec = op.getPartitionSpecs().get(0);
 assertEquals("type", spec.getName());
 assertEquals(Interpreter.STRING, spec.getInterpreter());
 List<String> expected = Arrays.asList("one", "two", "three");
 assertEquals(expected, spec.getSources());
}
origin: Nextdoor/bender

@Test
public void testLoadConfgTime() {
 BenderConfig config = BenderConfig.load("/com/nextdoor/bender/partition/partition_config_time.json");
 PartitionOperationConfig op =
   (PartitionOperationConfig) config.getSources().get(0).getOperationConfigs().get(0);
 PartitionSpec spec = op.getPartitionSpecs().get(0);
 assertEquals("dt", spec.getName());
 assertEquals(Interpreter.SECONDS, spec.getInterpreter());
 List<String> expected = Arrays.asList("epoch");
 assertEquals(expected, spec.getSources());
 assertEquals("2017-01-19 05:05:59", spec.interpret("1484802359"));
}
origin: Nextdoor/bender

 @Test
 public void testStringFormatLower() {
  BenderConfig config =
    BenderConfig.load("/com/nextdoor/bender/partition/partition_config_format.json");
  PartitionOperationConfig op =
    (PartitionOperationConfig) config.getSources().get(0).getOperationConfigs().get(0);
  PartitionSpec spec = op.getPartitionSpecs().get(0);
  spec.setStringFormat(StringFormat.TOLOWER);

  assertEquals("type", spec.getName());
  assertEquals(Interpreter.STRING, spec.getInterpreter());

  assertEquals("thisisatest", spec.interpret("ThisIsATest"));
 }
}
origin: Nextdoor/bender

@Test
public void testStringFormatUpper() {
 BenderConfig config =
   BenderConfig.load("/com/nextdoor/bender/partition/partition_config_format.json");
 PartitionOperationConfig op =
   (PartitionOperationConfig) config.getSources().get(0).getOperationConfigs().get(0);
 PartitionSpec spec = op.getPartitionSpecs().get(0);
 assertEquals("type", spec.getName());
 assertEquals(Interpreter.STRING, spec.getInterpreter());
 assertEquals(StringFormat.TOUPPER, spec.getStringFormat());
 assertEquals("THISISATEST", spec.interpret("ThisIsATest"));
}
com.nextdoor.bender.partitionPartitionOperationConfiggetPartitionSpecs

Popular methods of PartitionOperationConfig

    Popular in Java

    • Start an intent from android
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • startActivity (Activity)
    • setContentView (Activity)
    • Kernel (java.awt.image)
    • ConnectException (java.net)
      A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
    • NoSuchElementException (java.util)
      Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
    • AtomicInteger (java.util.concurrent.atomic)
      An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
    • LogFactory (org.apache.commons.logging)
      A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
    • LoggerFactory (org.slf4j)
      The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now