/**
* 把sqlLoad失败的日志写到DAS日志文件中
* @param logFileName
*/
private void readSqlLoadErrLog(String logFileName)
{
BufferedReader reader = null;
try
{
reader = new BufferedReader(new FileReader(new File(logFileName)));
StringBuffer logStrBuff = new StringBuffer();
String logStr;
while ((logStr = reader.readLine()) != null)
{
logStrBuff
.append(logStr + System.getProperty("line.separator"));
}
logger.error(logStrBuff.toString());
}
catch (FileNotFoundException e)
{
logger.error("Not found sqlload log file: " + logFileName, e);
}
catch (IOException e)
{
logger.error("Read sqlLoad log file error! The fileName is "
+ logFileName, e);
}
finally
{
try
{
if (reader != null)
{
reader.close();
reader = null;
}
}
catch (IOException e)
{
logger.error("Close reader failed!");
}
}
}
public int getDbType()
{
return dbType;
}
public void setDbType(int dbType)
{
this.dbType = dbType;
}
public String getDb()
{
return db;
}
public void setDb(String db)
{
this.db = db;
}
public String getFileName()
{
return fileName;
}
* 把sqlLoad失败的日志写到DAS日志文件中
* @param logFileName
*/
private void readSqlLoadErrLog(String logFileName)
{
BufferedReader reader = null;
try
{
reader = new BufferedReader(new FileReader(new File(logFileName)));
StringBuffer logStrBuff = new StringBuffer();
String logStr;
while ((logStr = reader.readLine()) != null)
{
logStrBuff
.append(logStr + System.getProperty("line.separator"));
}
logger.error(logStrBuff.toString());
}
catch (FileNotFoundException e)
{
logger.error("Not found sqlload log file: " + logFileName, e);
}
catch (IOException e)
{
logger.error("Read sqlLoad log file error! The fileName is "
+ logFileName, e);
}
finally
{
try
{
if (reader != null)
{
reader.close();
reader = null;
}
}
catch (IOException e)
{
logger.error("Close reader failed!");
}
}
}
public int getDbType()
{
return dbType;
}
public void setDbType(int dbType)
{
this.dbType = dbType;
}
public String getDb()
{
return db;
}
public void setDb(String db)
{
this.db = db;
}
public String getFileName()
{
return fileName;
}