11package com .orientechnologies .orient .test .database ;
22
3- import java .util .HashMap ;
4- import java .util .Map ;
5- import java .util .Random ;
6-
7- import org .testng .annotations .Test ;
8-
93import com .orientechnologies .orient .core .config .OGlobalConfiguration ;
104import com .orientechnologies .orient .core .db .document .ODatabaseDocumentTx ;
115import com .orientechnologies .orient .core .intent .OIntentMassiveInsert ;
1610import com .orientechnologies .orient .core .metadata .schema .OType ;
1711import com .orientechnologies .orient .core .record .impl .ODocument ;
1812import com .orientechnologies .orient .core .storage .OStorage .CLUSTER_TYPE ;
13+ import org .testng .annotations .Test ;
14+
15+ import java .util .HashMap ;
16+ import java .util .Map ;
17+ import java .util .Random ;
1918
2019public class TestOrientBulkInsert {
2120
@@ -39,16 +38,16 @@ public TestOrientBulkInsert() throws InterruptedException {
3938 OGlobalConfiguration .CACHE_LEVEL2_SIZE .setValue (0 ); // Turn off cache
4039
4140 OGlobalConfiguration .INDEX_AUTO_LAZY_UPDATES .setValue (0 ); // Turn off cache
42- OGlobalConfiguration .INDEX_MANUAL_LAZY_UPDATES .setValue (0 ); // Turn off cache
41+ OGlobalConfiguration .INDEX_MANUAL_LAZY_UPDATES .setValue (0 );
4342
44- OGlobalConfiguration .FILE_MMAP_STRATEGY .setValue (4 ); // Kein Memory Filemapping
45- OGlobalConfiguration .TX_USE_LOG .setValue (false ); // Keine Transaction logs benutzen
43+ OGlobalConfiguration .FILE_MMAP_STRATEGY .setValue (4 );
44+ OGlobalConfiguration .TX_USE_LOG .setValue (false );
4645
4746 Map defaultsMap = new HashMap <String , Object >();
48- defaultsMap .put ("mvrbtree.lazyUpdates" , 1 ); // Index wird immer direkt upgedated (Memory)
49- defaultsMap .put ("index.auto.lazyUpdates" , 1 ); // Index wird immer direkt upgedated (Memory)
50- defaultsMap .put ("index.manual.lazyUpdates" , 1 ); // Index wird immer direkt upgedated (Memory)
51- defaultsMap .put ("index.auto.rebuildAfterNotSoftClose" , false ); // Index wird nicht eigenständig aufgebaut (memory Probleme)
47+ defaultsMap .put ("mvrbtree.lazyUpdates" , 1 );
48+ defaultsMap .put ("index.auto.lazyUpdates" , 1 );
49+ defaultsMap .put ("index.manual.lazyUpdates" , 1 );
50+ defaultsMap .put ("index.auto.rebuildAfterNotSoftClose" , false );
5251
5352 OGlobalConfiguration .setConfiguration (defaultsMap );
5453
@@ -106,9 +105,9 @@ private ODocument createRandomDocument() {
106105 return document ;
107106 }
108107
109- static final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
110- static Random rnd = new Random ();
111- static int counter = 0 ;
108+ static final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
109+ static Random rnd = new Random ();
110+ static int counter = 0 ;
112111
113112 private String getRandomText (int len ) {
114113
@@ -117,7 +116,6 @@ private String getRandomText(int len) {
117116 sb .append (AB .charAt (rnd .nextInt (AB .length ())));
118117 }
119118 String s = sb .toString () + " - " + (++counter );
120- // System.out.println(s);
121119 return s ;
122120 }
123121
0 commit comments