/** * Jars required in "Pure YARN" jobs (names only, no paths) should * be listed here in full, including Giraph framework jar(s). * * @return the comma-separated list of jar names for export to cluster. */ public String getYarnLibJars() { return GIRAPH_YARN_LIBJARS.get(this); }
@Override public String computationName(GiraphConfiguration conf) { return JythonOptions.JYTHON_COMPUTATION_CLASS_NAME.get(conf); } }
/** * Get the ZooKeeper list. * * @return ZooKeeper list of strings, comma separated or null if none set. */ public String getZookeeperList() { return ZOOKEEPER_LIST.get(this); }
/** * Has the user enabled compression in netty client & server * * @return true if ok to do compression of netty requests */ public boolean doCompression() { switch (GiraphConstants.NETTY_COMPRESSION_ALGORITHM.get(this)) { case "SNAPPY": return true; case "INFLATE": return true; default: return false; } }
public String getLocalLevel() { return LOG_LEVEL.get(this); }
/** * Does the job have a {@link EdgeOutputFormat} subdir? * * @return True iff a {@link EdgeOutputFormat} subdir has been specified. */ public boolean hasVertexOutputFormatSubdir() { return !VERTEX_OUTPUT_FORMAT_SUBDIR.get(this).isEmpty(); }
@Override public boolean isDefaultValue(Configuration conf) { return Objects.equal(get(conf), defaultValue); }
/** * Does the job have a {@link EdgeOutputFormat} subdir? * * @return True iff a {@link EdgeOutputFormat} subdir has been specified. */ public boolean hasEdgeOutputFormatSubdir() { return !EDGE_OUTPUT_FORMAT_SUBDIR.get(this).isEmpty(); }
/** * Returns an array of output configuration options set in the input * configuration. * * @param conf Configuration * @return Array of options */ public static String[] getOutputConfOptions(Configuration conf) { String outputConfOptions = OUTPUT_CONF_OPTIONS.get(conf); return outputConfOptions.isEmpty() ? new String[0] : outputConfOptions.split(","); }
/** * Get the local hostname on the given interface. * * @return The local hostname * @throws UnknownHostException */ public String getLocalHostname() throws UnknownHostException { return DNS.getDefaultHost( GiraphConstants.DNS_INTERFACE.get(this), GiraphConstants.DNS_NAMESERVER.get(this)).toLowerCase(); }
@Override protected String getSubdir() { return EDGE_OUTPUT_FORMAT_SUBDIR.get(getConf()); } };
private void initConfigurators(GiraphConfiguration conf) { String configurators = CONFIGURATORS.get(conf); if (configurators != null) { String[] split = configurators.split(","); for (String configurator : split) { runConfigurator(conf, configurator); } } }
@Override protected String getSubdir() { return VERTEX_OUTPUT_FORMAT_SUBDIR.get(getConf()); } };
Configuration conf) { String edgeInputFormatDescriptions = EDGE_INPUT_FORMAT_DESCRIPTIONS.get(conf); if (edgeInputFormatDescriptions == null) { return Lists.newArrayList();
getMappingInputFormatDescriptions(Configuration conf) { String mappingInputFormatDescriptions = MAPPING_INPUT_FORMAT_DESCRIPTIONS.get(conf); if (mappingInputFormatDescriptions == null) { return Lists.newArrayList();
Configuration conf) { String vertexInputFormatDescriptions = VERTEX_INPUT_FORMAT_DESCRIPTIONS.get(conf); if (vertexInputFormatDescriptions == null) { return Lists.newArrayList();
public static <OD> void addOutputDesc(OD outputDesc, String confOption, GiraphConfiguration conf) { GiraphConstants.HADOOP_OUTPUT_FORMAT_CLASS.set(conf, BlockOutputFormat.class); String currentOutputs = OUTPUT_CONF_OPTIONS.get(conf); if (!currentOutputs.isEmpty()) { currentOutputs = currentOutputs + ","; } OUTPUT_CONF_OPTIONS.set(conf, currentOutputs + confOption); ConfigurationObjectUtils.setObjectKryo(outputDesc, confOption, conf); }
/** * Get decoder for message decompression in netty * * @return byte to message decoder */ public ByteToMessageDecoder getNettyCompressionDecoder() { switch (GiraphConstants.NETTY_COMPRESSION_ALGORITHM.get(this)) { case "SNAPPY": return new SnappyFramedDecoder(true); case "INFLATE": return new JdkZlibDecoder(); default: return null; } }
/** * Get encoder for message compression in netty * * @return message to byte encoder */ public MessageToByteEncoder getNettyCompressionEncoder() { switch (GiraphConstants.NETTY_COMPRESSION_ALGORITHM.get(this)) { case "SNAPPY": return new SnappyFramedEncoder(); case "INFLATE": return new JdkZlibEncoder(); default: return null; } }
@Override public void setConf( ImmutableClassesGiraphConfiguration conf) { jythonClassName = jythonClassNameOption().get(conf); useWrapper = conf.getValueNeedsWrappers().get(getGraphType()); }