File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/java/org/embulk/input/gcs Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11
11
import org .embulk .util .config .ConfigMapperFactory ;
12
12
import org .embulk .util .config .TaskMapper ;
13
13
import org .embulk .util .config .units .LocalFile ;
14
+ import org .slf4j .Logger ;
15
+ import org .slf4j .LoggerFactory ;
14
16
15
17
import java .io .IOException ;
16
18
import java .util .List ;
@@ -23,6 +25,7 @@ public class GcsFileInputPlugin
23
25
.addDefaultModules ().build ();
24
26
public static final ConfigMapper CONFIG_MAPPER = CONFIG_MAPPER_FACTORY .createConfigMapper ();
25
27
public static final TaskMapper TASK_MAPPER = CONFIG_MAPPER_FACTORY .createTaskMapper ();
28
+ private static final Logger logger = LoggerFactory .getLogger (GcsFileInputPlugin .class );
26
29
@ Override
27
30
public ConfigDiff transaction (ConfigSource config ,
28
31
FileInputPlugin .Control control )
@@ -62,6 +65,9 @@ else if (AuthUtils.AuthMethod.private_key.equals(task.getAuthMethod())) {
62
65
// list files recursively if path_prefix is specified
63
66
if (task .getPathPrefix ().isPresent ()) {
64
67
task .setFiles (GcsFileInput .listFiles (task ));
68
+ if (task .getFiles ().getTaskCount () == 0 ) {
69
+ logger .info ("No file is found in the path(s) identified by path_prefix" );
70
+ }
65
71
}
66
72
else {
67
73
if (task .getPathFiles ().isEmpty ()) {
You can’t perform that action at this time.
0 commit comments