This commit is contained in:
xingtanzjr 2017-05-24 11:54:30 +08:00
parent d538db4764
commit c7c4dfa5c3
5 changed files with 13 additions and 7 deletions

View File

@ -79,6 +79,7 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>

View File

@ -40,10 +40,11 @@ public class TSFileDBConfig {
*/
public int maxBufferWriteNodeNum = 50;
public int defaultFetchSize = 1000000;
public String writeLogPath = "src/main/resources/writeLog.log";
public String walFolder = "src/main/resources/wals/";
public int LogCompactSize = 10000;
public int LogMemorySize = 1;
public int LogCompactSize = 500000;
public int LogMemorySize = 10000;
public TSFileDBConfig() {
}

View File

@ -71,7 +71,7 @@ public class TSFileDBDescriptor {
conf.maxOverflowNodeNum = Integer.parseInt(properties.getProperty("maxOverflowNodeNum", conf.maxOverflowNodeNum + ""));
conf.maxBufferWriteNodeNum = Integer.parseInt(properties.getProperty("maxBufferWriteNodeNum", conf.maxBufferWriteNodeNum + ""));
conf.defaultFetchSize = Integer.parseInt(properties.getProperty("defaultFetchSize", conf.defaultFetchSize + ""));
conf.writeLogPath = properties.getProperty("writeLogPath", tsfileHome+"/data/writeLog.log");
conf.walFolder = properties.getProperty("walFolder", tsfileHome+"/data/wals/");
} catch (IOException e) {
LOGGER.warn("Cannot load config file, use default configuration", e);
@ -102,6 +102,6 @@ public class TSFileDBDescriptor {
System.out.println(config.maxOverflowNodeNum);
System.out.println(config.maxBufferWriteNodeNum);
System.out.println(config.defaultFetchSize);
System.out.println(config.writeLogPath);
System.out.println(config.walFolder);
}
}

View File

@ -1,10 +1,12 @@
package cn.edu.thu.tsfiledb.sys.writeLog;
import cn.edu.thu.tsfile.common.conf.TSFileDescriptor;
import cn.edu.thu.tsfile.common.utils.BytesUtils;
import cn.edu.thu.tsfile.timeseries.read.qp.Path;
import cn.edu.thu.tsfile.timeseries.write.record.DataPoint;
import cn.edu.thu.tsfile.timeseries.write.record.TSRecord;
import cn.edu.thu.tsfiledb.conf.TSFileDBDescriptor;
import cn.edu.thu.tsfiledb.jdbc.TsfileConfig;
import cn.edu.thu.tsfiledb.qp.logical.operator.Operator;
import cn.edu.thu.tsfiledb.qp.physical.plan.InsertPlan;
import cn.edu.thu.tsfiledb.qp.physical.plan.MultiInsertPlan;
@ -43,7 +45,7 @@ public class WriteLogNode {
this.path = path;
this.LogCompactSize = TSFileDBDescriptor.getInstance().getConfig().LogCompactSize;
this.LogMemorySize = TSFileDBDescriptor.getInstance().getConfig().LogMemorySize;
filePath = "src/main/resources/log/" + path + ".log";
filePath = TSFileDBDescriptor.getInstance().getConfig().walFolder + path + ".log";
backFilePath = filePath + ".backup";
plansInMemory = new ArrayList<>();
hasBufferWriteFlush = false;

View File

@ -8,6 +8,8 @@ if [ -z "${TSFILE_HOME}" ]; then
export TSFILE_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi
TSFILE_CONF=${TSFILE_HOME}/conf
TSFILE_LOGS=${TSFILE_HOME}/logs
MAIN_CLASS=cn.edu.thu.tsfiledb.jdbc.Client
@ -30,6 +32,6 @@ else
fi
exec "$JAVA" -cp "$CLASSPATH" "$MAIN_CLASS" "$1" "$2" "$3"
exec "$JAVA" -DTSFILE_HOME=${TSFILE_HOME} -Dlogback.configurationFile=${TSFILE_CONF}/logback.xml -cp "$CLASSPATH" "$MAIN_CLASS" "$1" "$2" "$3"
exit $?