package com.chenyang.nse.bussiness.tools.dataprocess.hive.hdfs;

import com.chenyang.nse.bussiness.entity.db.ColumnInfo;
import com.chenyang.nse.bussiness.tools.dataprocess.hive.hdfs.format.HdfsFileWriter;
import com.chenyang.nse.bussiness.tools.dataprocess.hive.hdfs.format.HiveFileType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TableInfo {
   public String tableName;
   public String location;
   public String sourceType = "HIVE";
   public String dataProcessType = "HIVE";
   public String lineDelimiter = "\n";
   public String sourceDelimiters = "\t";
   public Map<String, String> format;
   public List<ColumnInfo> cols = new ArrayList();
   public Map<String, Object> datas = new HashMap();

   public String getTempTableName() {
      return this.tableName + "temp_table_for_orc";
   }

   public HiveFileType getFileType() {
      return HdfsFileWriter.getFileType((String)this.format.get("serde") + (String)this.format.get("input.format"));
   }
}
