Example usage for org.apache.hadoop.filecache DistributedCache setArchiveTimestamps

List of usage examples for org.apache.hadoop.filecache DistributedCache setArchiveTimestamps

Introduction

In this page you can find the example usage for org.apache.hadoop.filecache DistributedCache setArchiveTimestamps.

Prototype

@Deprecated
public static void setArchiveTimestamps(Configuration conf, String timestamps) 

Source Link

Document

This is to check the timestamp of the archives to be localized.

Usage

From source file:io.apigee.lembos.node.types.DistributedCacheWrap.java

License:Apache License

/**
 * Java wrapper for {@link DistributedCache#setArchiveTimestamps(Configuration, String)}.
 *
 * @param ctx the JavaScript context/*  www  .j  a  va 2  s  .com*/
 * @param thisObj the 'this' object
 * @param args the function arguments
 * @param func the function being called
 */
@JSStaticFunction
public static void setArchiveTimestamps(final Context ctx, final Scriptable thisObj, final Object[] args,
        final Function func) {
    final Object arg0 = args.length >= 1 ? args[0] : Undefined.instance;
    final Object arg1 = args.length >= 2 ? args[1] : Undefined.instance;

    if (args.length < 2) {
        throw Utils.makeError(ctx, thisObj, LembosMessages.TWO_ARGS_EXPECTED);
    } else if (!JavaScriptUtils.isDefined(arg0)) {
        throw Utils.makeError(ctx, thisObj, LembosMessages.FIRST_ARG_REQUIRED);
    } else if (!JavaScriptUtils.isDefined(arg1)) {
        throw Utils.makeError(ctx, thisObj, LembosMessages.SECOND_ARG_REQUIRED);
    } else if (!(arg0 instanceof ConfigurationWrap)) {
        throw Utils.makeError(ctx, thisObj, LembosMessages.FIRST_ARG_MUST_BE_CONF);
    }

    DistributedCache.setArchiveTimestamps(((ConfigurationWrap) arg0).getConf(), arg1.toString());
}