Browse Source

Merge branch 'release/2.11.2'

master 2.11.2
Eyck Jentzsch 2 weeks ago
parent
commit
f27bcd7109
22 changed files with 47 additions and 43 deletions
  1. +1
    -1
      features/com.minres.scviewer.database.feature/pom.xml
  2. +1
    -1
      features/com.minres.scviewer.e4.feature/pom.xml
  3. +1
    -1
      features/com.minres.scviewer.e4.platform.feature/pom.xml
  4. +1
    -1
      features/com.minres.scviewer.feature/pom.xml
  5. +1
    -1
      features/com.minres.scviewer.ui.feature/pom.xml
  6. +1
    -1
      plugins/com.minres.scviewer.database.sqlite/pom.xml
  7. +1
    -1
      plugins/com.minres.scviewer.database.text/pom.xml
  8. +23
    -17
      plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java
  9. +1
    -1
      plugins/com.minres.scviewer.database.ui.swt/pom.xml
  10. +1
    -1
      plugins/com.minres.scviewer.database.vcd/pom.xml
  11. +1
    -1
      plugins/com.minres.scviewer.database/pom.xml
  12. +1
    -1
      plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
  13. +2
    -2
      plugins/com.minres.scviewer.e4.application/pom.xml
  14. +0
    -1
      plugins/com.minres.scviewer.ui/.classpath
  15. +0
    -1
      plugins/com.minres.scviewer.ui/.project
  16. +1
    -1
      plugins/com.minres.scviewer.ui/pom.xml
  17. +2
    -2
      pom.xml
  18. +2
    -2
      products/com.minres.scviewer.e4.product/pom.xml
  19. +2
    -2
      products/com.minres.scviewer.e4.product/scviewer.product
  20. +1
    -1
      releng/com.minres.scviewer.target/pom.xml
  21. +2
    -2
      releng/com.minres.scviewer.updateSite/pom.xml
  22. +1
    -1
      tests/com.minres.scviewer.database.test/pom.xml

+ 1
- 1
features/com.minres.scviewer.database.feature/pom.xml View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>3.0.0-SNAPSHOT</version>

+ 1
- 1
features/com.minres.scviewer.e4.feature/pom.xml View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>

+ 1
- 1
features/com.minres.scviewer.e4.platform.feature/pom.xml View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>

+ 1
- 1
features/com.minres.scviewer.feature/pom.xml View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>

+ 1
- 1
features/com.minres.scviewer.ui.feature/pom.xml View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>

+ 1
- 1
plugins/com.minres.scviewer.database.sqlite/pom.xml View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

+ 1
- 1
plugins/com.minres.scviewer.database.text/pom.xml View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

+ 23
- 17
plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java View File

@ -34,8 +34,10 @@ import java.util.zip.GZIPInputStream;
import org.eclipse.collections.impl.map.mutable.UnifiedMap;
import org.mapdb.DB;
import org.mapdb.DB.HashMapMaker;
import org.mapdb.DB.TreeMapSink;
import org.mapdb.DBMaker;
import org.mapdb.HTreeMap;
import org.mapdb.Serializer;
import com.google.common.collect.HashMultimap;
@ -55,6 +57,13 @@ import com.minres.scviewer.database.tx.ITx;
*/
public class TextDbLoader implements IWaveformDbLoader {
/** the file size limit of a zipped txlog where the loader starts to use a file mapped database */
private static final long MEMMAP_LIMIT=256l*1024l*1024l;
private static final long MAPDB_INITIAL_ALLOC = 512l*1024l*1024l;
private static final long MAPDB_INCREMENTAL_ALLOC = 128l*1024l*1024l;
/** The max time. */
private Long maxTime = 0L;
@ -76,8 +85,6 @@ public class TextDbLoader implements IWaveformDbLoader {
/** The transactions. */
Map<Long, ScvTx> transactions = null;
Map<Long, Long> id2index = new HashMap<>();
/** The attribute types. */
final Map<String, TxAttributeType> attributeTypes = UnifiedMap.newMap();
@ -110,7 +117,7 @@ public class TextDbLoader implements IWaveformDbLoader {
}
public ScvTx getScvTx(long id) {
return transactions.get(id2index.get(id));
return transactions.get(id);
}
/**
@ -162,10 +169,9 @@ public class TextDbLoader implements IWaveformDbLoader {
public void load(IWaveformDb db, File file) throws InputFormatException {
dispose();
boolean gzipped = isGzipped(file);
if (file.length() < 75000000 * (gzipped ? 1 : 10)
if (file.length() < MEMMAP_LIMIT * (gzipped ? 1 : 10)
|| "memory".equals(System.getProperty("ScvBackingDB", "file")))
mapDb = DBMaker.memoryDirectDB().allocateStartSize(512l * 1024l * 1024l)
.allocateIncrement(128l * 1024l * 1024l).cleanerHackEnable().make();
mapDb = DBMaker.memoryDirectDB().make();
else {
File mapDbFile;
try {
@ -175,15 +181,18 @@ public class TextDbLoader implements IWaveformDbLoader {
throw new InputFormatException(e.toString());
}
mapDb = DBMaker.fileDB(mapDbFile).fileMmapEnable() // Always enable mmap
.fileMmapEnableIfSupported().fileMmapPreclearDisable().allocateStartSize(512l * 1024l * 1024l)
.allocateIncrement(128l * 1024l * 1024l).cleanerHackEnable().make();
.fileMmapPreclearDisable().allocateStartSize(MAPDB_INITIAL_ALLOC)
.allocateIncrement(MAPDB_INCREMENTAL_ALLOC).cleanerHackEnable().make();
mapDbFile.deleteOnExit();
}
TextDbParser parser = new TextDbParser(this);
try {
parser.txSink = mapDb.treeMap("transactions", Serializer.LONG, Serializer.JAVA).createFromSink();
// parser.txSink = mapDb.treeMap("transactions", Serializer.LONG, Serializer.JAVA).createFromSink();
parser.txSink = mapDb.hashMap("transactions", Serializer.LONG, Serializer.JAVA).create();
parser.parseInput(gzipped ? new GZIPInputStream(new FileInputStream(file)) : new FileInputStream(file));
transactions = parser.txSink.create();
// transactions = parser.txSink.create();
transactions = parser.txSink;
} catch (IllegalArgumentException | ArrayIndexOutOfBoundsException e) {
} catch (Exception e) {
throw new InputFormatException(e.toString());
@ -275,7 +284,7 @@ public class TextDbLoader implements IWaveformDbLoader {
HashMap<Long, ScvTx> transactionById = new HashMap<>();
/** The tx sink. */
TreeMapSink<Long, ScvTx> txSink;
HTreeMap<Long, ScvTx> txSink;
/** The reader. */
BufferedReader reader = null;
@ -286,7 +295,6 @@ public class TextDbLoader implements IWaveformDbLoader {
/** The attr value lut. */
Map<String, Integer> attrValueLut = new HashMap<>();
long indexCount = 0;
/**
* Instantiates a new text db parser.
*
@ -348,10 +356,9 @@ public class TextDbLoader implements IWaveformDbLoader {
String[] tokens = curLine.split("\\s+");
if ("tx_record_attribute".equals(tokens[0])) {
Long id = Long.parseLong(tokens[1]);
String name = tokens[2].substring(1, tokens[2].length());
String name = tokens[2].substring(1, tokens[2].length()-1);
DataType type = DataType.valueOf(tokens[3]);
String remaining = tokens.length > 5 ? String.join(" ", Arrays.copyOfRange(tokens, 5, tokens.length))
: "";
String remaining = tokens.length > 5 ? String.join(" ", Arrays.copyOfRange(tokens, 5, tokens.length)) : "";
TxAttributeType attrType = getAttrType(name, type, AssociationType.RECORD);
transactionById.get(id).attributes.add(new TxAttribute(attrType, getAttrString(attrType, remaining)));
} else if ("tx_begin".equals(tokens[0])) {
@ -407,8 +414,7 @@ public class TextDbLoader implements IWaveformDbLoader {
nextLine = reader.readLine();
}
}
txSink.put(indexCount, scvTx);
loader.id2index.put(scvTx.getId(), indexCount++);
txSink.put(scvTx.getId(), scvTx);
transactionById.remove(id);
} else if ("tx_relation".equals(tokens[0])) {
Long tr2 = Long.parseLong(tokens[2]);

+ 1
- 1
plugins/com.minres.scviewer.database.ui.swt/pom.xml View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>3.0.0-SNAPSHOT</version>

+ 1
- 1
plugins/com.minres.scviewer.database.vcd/pom.xml View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

+ 1
- 1
plugins/com.minres.scviewer.database/pom.xml View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

+ 1
- 1
plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
Bundle-Version: 2.11.1.qualifier
Bundle-Version: 2.11.2.qualifier
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",

+ 2
- 2
plugins/com.minres.scviewer.e4.application/pom.xml View File

@ -3,11 +3,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.minres.scviewer.e4.application</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

+ 0
- 1
plugins/com.minres.scviewer.ui/.classpath View File

@ -3,6 +3,5 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

+ 0
- 1
plugins/com.minres.scviewer.ui/.project View File

@ -33,7 +33,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>

+ 1
- 1
plugins/com.minres.scviewer.ui/pom.xml View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

+ 2
- 2
pom.xml View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>releng/com.minres.scviewer.target</module>
@ -55,7 +55,7 @@
<artifact>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.target</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
</artifact>
</target>
<environments>

+ 2
- 2
products/com.minres.scviewer.e4.product/pom.xml View File

@ -6,11 +6,11 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

+ 2
- 2
products/com.minres.scviewer.e4.product/scviewer.product View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SCViewer" uid="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.11.1.qualifier" useFeatures="true" includeLaunchers="true">
<product name="SCViewer" uid="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.11.2.qualifier" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
@ -9,7 +9,7 @@
<launcherArgs>
<programArgs>-clearPersistedState
</programArgs>
<vmArgs>-Xmx2G -Dosgi.instance.area=@user.home/.scviewer -Dosgi.instance.area.default=@user.home/.scviewer
<vmArgs>-Xmx1G -Dosgi.instance.area=@user.home/.scviewer -Dosgi.instance.area.default=@user.home/.scviewer
</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>

+ 1
- 1
releng/com.minres.scviewer.target/pom.xml View File

@ -12,7 +12,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>

+ 2
- 2
releng/com.minres.scviewer.updateSite/pom.xml View File

@ -3,12 +3,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.minres.scviewer.updateSite</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<build>

+ 1
- 1
tests/com.minres.scviewer.database.test/pom.xml View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.11.1-SNAPSHOT</version>
<version>2.11.2-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-test-plugin</packaging>

Loading…
Cancel
Save