*/
public boolean sendExportFile(ExporterBean bean, String user) {
// 圧縮に関する情報を取得
String strCompType = ConfigurationLoader.getProperty(Constants.PROP_KEY_EXP_FILE_COMP_TYPE);
FileCompType compType = FileCompType.find(strCompType);
OutputStream output = getOutputStream();
try {
FileList.Writer writer;
try {
writer = FileList.createWriter(output, compType == FileCompType.DEFLATED);
} catch (IOException e) {
throw new BulkLoaderSystemException(e, getClass(), "TG-COLLECTOR-02001",
"Exporterと接続するチャネルを開けませんでした");
}
Configuration conf = new Configuration();
List<String> l = bean.getExportTargetTableList();
for (String tableName : l) {
ExportTargetTableBean targetTable = bean.getExportTargetTable(tableName);
Class<? extends Writable> targetTableModel =
targetTable.getExportTargetType().asSubclass(Writable.class);
List<Path> filePath = FileNameUtil.createPaths(
conf,
targetTable.getDfsFilePaths(),
bean.getExecutionId(),
user);
// Export対象テーブルに対するディレクトリ数分繰り返す
int fileCount = filePath.size();
long recordCount = 0;
for (int i = 0; i < fileCount; i++) {
// Exportファイルを送信
LOG.info("TG-COLLECTOR-02002",
tableName, filePath.get(i), compType.getSymbol(), targetTableModel.toString());
long countInFile = send(targetTableModel, filePath.get(i).toString(), writer, tableName);
if (countInFile >= 0) {
recordCount += countInFile;
}
LOG.info("TG-COLLECTOR-02003",
tableName, filePath.get(i), compType.getSymbol(), targetTableModel.toString());
}
LOG.info("TG-PROFILE-01004",
bean.getTargetName(),
bean.getBatchId(),