Examples of conf()


Examples of org.apache.crunch.GroupingOptions.Builder.conf()

      if (tf == WritableTypeFamily.getInstance()) {
        builder.sortComparatorClass(ReverseWritableComparator.class);
      } else if (tf == AvroTypeFamily.getInstance()) {
        AvroType<K> avroType = (AvroType<K>) ptype;
        Schema schema = avroType.getSchema();
        builder.conf("crunch.schema", schema.toString());
        builder.sortComparatorClass(ReverseAvroComparator.class);
      } else {
        throw new RuntimeException("Unrecognized type family: " + tf);
      }
    } else if (tf == AvroTypeFamily.getInstance()) {
View Full Code Here

Examples of org.apache.crunch.GroupingOptions.Builder.conf()

        builder.sortComparatorClass(ReverseAvroComparator.class);
      } else {
        throw new RuntimeException("Unrecognized type family: " + tf);
      }
    } else if (tf == AvroTypeFamily.getInstance()) {
      builder.conf("crunch.schema", ((AvroType<K>) ptype).getSchema().toString());
    }
    configureReducers(builder, ptable, conf, numReducers);
    return builder.build();
  }
View Full Code Here

Examples of org.apache.crunch.GroupingOptions.Builder.conf()

        builder.sortComparatorClass(TupleWritableComparator.class);
      }
    } else if (tf == AvroTypeFamily.getInstance()) {
      AvroType<K> avroType = (AvroType<K>) keyType;
      Schema schema = avroType.getSchema();
      builder.conf("crunch.schema", schema.toString());
      if (columnOrders.length == 1 && columnOrders[0].order == Order.DESCENDING) {
        builder.sortComparatorClass(ReverseAvroComparator.class);
      }
    } else {
      throw new RuntimeException("Unrecognized type family: " + tf);
View Full Code Here

Examples of org.rythmengine.RythmEngine.conf()

        if (null != template) {
            escape = template.__curEscape();
        } else {
            RythmEngine engine = RythmEngine.get();
            if (null != engine) {
                escape = engine.conf().defaultCodeType().escape();
            } else {
                escape = Escape.RAW;
            }
        }
        return escape.apply(o);
View Full Code Here

Examples of org.rythmengine.RythmEngine.conf()

     *
     * @return the configuration instance associated with engine running in the current thread
     */
    public static RythmConfiguration get() {
        RythmEngine engine = RythmEngine.get();
        return null != engine ? engine.conf() : EMPTY_CONF;
    }

    private final static ILogger logger = Logger.get(RythmConfiguration.class);

    public void debug() {
View Full Code Here

Examples of org.rythmengine.RythmEngine.conf()

                    iterator = Collections.EMPTY_LIST.iterator();
                    return;
                }
                List<String> seps = new ArrayList<String>();
                RythmEngine engine = RythmEngine.get();
                RythmConfiguration conf = engine.conf();
                if ("zh".equals(conf.locale().getLanguage())) {
                    seps.addAll(Arrays.asList("\n,、,,,;,。,:".split(",")));
                } else {
                    seps.add("\n");
                }
View Full Code Here

Examples of org.rythmengine.RythmEngine.conf()

            return template.__curLocale();
        }
        Locale retval;
        RythmEngine engine = RythmEngine.get();
        if (null != engine) {
            retval = engine.conf().locale();
        } else {
            retval = RythmConfigurationKey.I18N_LOCALE.getDefaultConfiguration();
        }
        return retval;
    }
View Full Code Here

Examples of org.rythmengine.RythmEngine.conf()

    private int lastCursor = 0;

    public TemplateTokenizer(IContext context) {
        ctx = context;
        RythmEngine engine = ctx.getEngine();
        RythmConfiguration conf = engine.conf();
        if ((conf.smartEscapeEnabled() || conf.naturalTemplateEnabled()) && engine.extensionManager().hasTemplateLangs()) {
            parsers.add(new CodeTypeBlockStartSensor(ctx));
            parsers.add(new CodeTypeBlockEndSensor(ctx));
        }
        if (conf.naturalTemplateEnabled() && engine.extensionManager().hasTemplateLangs()) {
View Full Code Here

Examples of org.rythmengine.RythmEngine.conf()

            ICodeType type = engine.renderSettings.codeType();
            if (null == type) {
                type = templateResource.codeType(engine());
            }
            if (null == type || ICodeType.DefImpl.RAW == type) {
                type = engine.conf().defaultCodeType();
            }
            codeType = type;
            if (null == name) {
                // this is the root level template class
                root = this;
View Full Code Here

Examples of org.rythmengine.RythmEngine.conf()

            codeType = type;
            if (null == name) {
                // this is the root level template class
                root = this;
                name = templateResource.getSuggestedClassName() + CN_SUFFIX;
                if (engine.conf().typeInferenceEnabled()) {
                    name += ParamTypeInferencer.uuid();
                }
                ITemplateResourceLoader loader = engine().resourceManager().whichLoader(templateResource);
                if (null != loader) {
                    Object k = templateResource.getKey();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.