Skip to content

Commit 09e04d4

Browse files
authored
DS-1644: (#1710)
TaskedImportFilesToSpace: expose filecount for compiler Signed-off-by: mchrza <maximilian.chrzan@here.com>
1 parent 994d15a commit 09e04d4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/impl/transport/TaskedImportFilesToSpace.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import static com.here.xyz.jobs.steps.Step.Visibility.USER;
5656
import static com.here.xyz.jobs.steps.impl.SpaceBasedStep.LogPhase.JOB_EXECUTOR;
5757
import static com.here.xyz.jobs.steps.impl.SpaceBasedStep.LogPhase.JOB_VALIDATE;
58+
import static com.here.xyz.jobs.steps.impl.SpaceBasedStep.LogPhase.STEP_EXECUTE;
5859
import static com.here.xyz.jobs.steps.impl.SpaceBasedStep.LogPhase.STEP_ON_ASYNC_SUCCESS;
5960
import static com.here.xyz.util.web.XyzWebClient.WebClientException;
6061
import static com.here.xyz.jobs.steps.impl.transport.TaskedImportFilesToSpace.Format.GEOJSON;
@@ -143,6 +144,20 @@ public TaskedImportFilesToSpace withFormat(Format format) {
143144
return this;
144145
}
145146

147+
public void setFileCount(int fileCount) {
148+
this.fileCount = fileCount;
149+
}
150+
151+
public int getFileCount() {
152+
return fileCount;
153+
}
154+
155+
//TODO: Adjust resource calculation to not rely on user provided file count
156+
public TaskedImportFilesToSpace withFileCount(int fileCount) {
157+
setFileCount(fileCount);
158+
return this;
159+
}
160+
146161
public long getMaxInputBytesForNonEmptyImport() {
147162
return maxInputBytesForNonEmptyImport;
148163
}
@@ -166,10 +181,14 @@ protected void initialSetup() throws SQLException, TooManyResourcesClaimed, WebC
166181
long newVersion = getOrIncreaseVersionSequence();
167182

168183
if(useFeatureWriter()) {
184+
infoLog(STEP_EXECUTE, "initialSetup - Using FeatureWriter for import!");
185+
169186
String superRootTable = space().getExtension() != null ? getRootTableName(superSpace()) : null;
170187
runBatchWriteQuerySync(getQueryBuilder().buildTemporaryTriggerTableBlockForImportWithFW(space().getOwner(),
171188
newVersion, superRootTable, updateStrategy), db(), 0);
172189
}else{
190+
infoLog(STEP_EXECUTE, "initialSetup - Import into empty layer detected!");
191+
173192
if(format.equals(FAST_IMPORT_INTO_EMPTY))
174193
return;
175194
//import into an empty, non-composite, layer

0 commit comments

Comments
 (0)