@@ -54,6 +54,7 @@ public class DingoConfiguration {
5454 private SecurityConfiguration security = new SecurityConfiguration ();
5555 private VariableConfiguration variable = new VariableConfiguration ();
5656 private CommonConfiguration common = new CommonConfiguration ();
57+ private SpillConfiguration spill = new SpillConfiguration ();
5758
5859 public static synchronized void parse (final String configPath ) throws Exception {
5960 if (configPath != null ) {
@@ -63,6 +64,7 @@ public static synchronized void parse(final String configPath) throws Exception
6364 INSTANCE .security = INSTANCE .getConfig ("security" , SecurityConfiguration .class );
6465 INSTANCE .variable = INSTANCE .getConfig ("variable" , VariableConfiguration .class );
6566 INSTANCE .common = INSTANCE .getConfig ("common" , CommonConfiguration .class );
67+ INSTANCE .spill = INSTANCE .getConfig ("spill" , SpillConfiguration .class );
6668 }
6769
6870 private static void copyConfig (Map <String , Object > from , Map <String , Object > to ) {
@@ -117,6 +119,15 @@ public static Integer lowerCaseTableNames() {
117119 return Optional .mapOrGet (INSTANCE .variable , VariableConfiguration ::getLowerCaseTableNames , () -> 2 );
118120 }
119121
122+ public static String spillDir () {
123+ return Optional .mapOrGet (INSTANCE .spill , SpillConfiguration ::getDir ,
124+ () -> System .getProperty ("java.io.tmpdir" ) + java .io .File .separator + "dingo-spill" );
125+ }
126+
127+ public static int spillThreshold () {
128+ return Optional .mapOrGet (INSTANCE .spill , SpillConfiguration ::getThreshold , () -> 100000 );
129+ }
130+
120131 public static CommonId serverId () {
121132 return INSTANCE .serverId ;
122133 }
0 commit comments