// Path: src/main/java/colossal/util/TimeShard.java
// public interface TimeShard {
//     public String makePath(DateTime ts);
// 
//     public String makeTimestamp(DateTime start, DateTime end);
// }


import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import colossal.pipe.*;
import colossal.util.TimeShard;
/**
 * Copyright (C) 2010-2014 Think Big Analytics, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. See accompanying LICENSE file.
 */
package colossal.pipe.sample;



public class SamplePipe extends Configured implements Tool {

    @SuppressWarnings({ "unchecked", "unused" })
    @Override
    public int run(String[] args) throws Exception {
        ColPipe pipe = new ColPipe(getClass());

        /* Parse options - just use the standard options - input and output location, time window, etc. */
        BaseOptions o = new BaseOptions();
        int result = o.parse(pipe, args);
        if (result != 0)
            return result;

// Path: src/main/java/colossal/util/TimeShard.java
// public interface TimeShard {
//     public String makePath(DateTime ts);
// 
//     public String makeTimestamp(DateTime start, DateTime end);
// }


// Path: src/sample/java/colossal/pipe/sample/SamplePipe.java
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import colossal.pipe.*;
import colossal.util.TimeShard;

/**
 * Copyright (C) 2010-2014 Think Big Analytics, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. See accompanying LICENSE file.
 */
package colossal.pipe.sample;



public class SamplePipe extends Configured implements Tool {

    @SuppressWarnings({ "unchecked", "unused" })
    @Override
    public int run(String[] args) throws Exception {
        ColPipe pipe = new ColPipe(getClass());

        /* Parse options - just use the standard options - input and output location, time window, etc. */
        BaseOptions o = new BaseOptions();
        int result = o.parse(pipe, args);
        if (result != 0)
            return result;

        String hrPath = TimeShard.makePath(o.getStart());