/** * Same as {@link #createObjectStore(ApplicationConfigurer, String, Type, DatasetProperties)} but with empty * properties. */ public static void createObjectStore(ApplicationConfigurer configurer, String datasetName, Type type) throws UnsupportedTypeException { createObjectStore(configurer, datasetName, type, DatasetProperties.EMPTY); }
@Override public void configure() { try { setName(NAME); setDescription("Sample application"); ObjectStores.createObjectStore(getConfigurer(), "input", String.class); ObjectStores.createObjectStore(getConfigurer(), "output", String.class); addMapReduce(new WordCountMapReduce()); addWorkflow(new SampleWorkflow()); } catch (UnsupportedTypeException e) { throw Throwables.propagate(e); } }
@Override public void configure() { try { setName("AppWithMapReduceObjectStore"); setDescription("Application with MapReduce job using objectstore as dataset"); createDataset("count", KeyValueTable.class); ObjectStores.createObjectStore(getConfigurer(), "keys", String.class); addMapReduce(new ComputeCounts()); } catch (Throwable t) { throw Throwables.propagate(t); } }
@Override public void configure() { try { setName("AppWithSchedule"); setDescription("Sample application"); ObjectStores.createObjectStore(getConfigurer(), INPUT_NAME, String.class); ObjectStores.createObjectStore(getConfigurer(), OUTPUT_NAME, String.class); addWorkflow(new SampleWorkflow()); schedule(buildSchedule(EVERY_HOUR_SCHEDULE, ProgramType.WORKFLOW, WORKFLOW_NAME) .triggerByTime("0 */1 * * *")); schedule(buildSchedule(EVERY_THREE_SECOND_SCHEDULE, ProgramType.WORKFLOW, WORKFLOW_NAME) .triggerByTime("0/3 * * * * ?")); } catch (UnsupportedTypeException e) { throw Throwables.propagate(e); } }
@Override public void configure() { try { createDataset("count", KeyValueTable.class); createDataset("totals", Table.class); ObjectStores.createObjectStore(getConfigurer(), "keys", String.class); addSpark(new CharCountProgram()); addSpark(new ScalaCharCountProgram()); addSpark(new ScalaCrossNSProgram()); } catch (Throwable t) { throw Throwables.propagate(t); } } }
setName(NAME); setDescription("Sample application"); ObjectStores.createObjectStore(getConfigurer(), "input", String.class); ObjectStores.createObjectStore(getConfigurer(), "output", String.class); AppConfig config = getConfig();