Skip to content

Instantly share code, notes, and snippets.

@qiyuangong qiyuangong/

Last active May 27, 2017
What would you like to do?
package org.smartdata.server.actions;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.DFSClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.smartdata.common.actions.ActionType;
import java.util.UUID;
public class UDAction implements Action {
private static final Logger LOG = LoggerFactory.getLogger(UDAction.class);
public String storagePolicy;
private String fileName;
private Configuration conf;
private DFSClient dfsClient;
private String name = "UDAction";
public UDAction() {
public String getName() {
return name;
public Action initial(DFSClient client, Configuration conf, String[] args) {
this.dfsClient = client;
this.conf = conf;
this.fileName = args[0];
this.storagePolicy = args[1];
return this;
public UUID run() {
for (int i = 10; i> 0; i--) {"User Defined Action {}", name);
return null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.