eBay / FeedSDK

Java SDK for downloading large gzipped (tsv) item feed files and applying filters for curation
https://developer.ebay.com/api-docs/buy/feed/resources/item/methods/getItemFeed
Apache License 2.0
24 stars 24 forks source link

need to filter getItemFeed items with level 2 categories #5

Open AskaoAhmedSaad opened 5 years ago

AskaoAhmedSaad commented 5 years ago

hello, I need to filter getItemFeed items with level 2 categories to get items for only those subcategories, so I used -c2f like this way:

java -jar feed-sdk-1.0.2.beta-RELEASE-uber.jar -dt 20190322 -c1 131090 -c2f 9884 34998 82099 179487 -scope NEWLY_LISTED -mkt EBAY_DE -locf DE -cl ebayconf.yaml

but got this error

15:13:24,178 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
15:13:24,179 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
15:13:24,179 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/home/askao/feed-sdk-1.0.2.beta-RELEASE-uber.jar!/logback.xml]
15:13:24,187 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@2d8f65a4 - URL [jar:file:/home/askao/feed-sdk-1.0.2.beta-RELEASE-uber.jar!/logback.xml] is not of type file
15:13:24,249 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
15:13:24,251 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
15:13:24,252 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
15:13:24,286 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
15:13:24,321 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
15:13:24,322 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
15:13:24,330 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@35:18 - no applicable action for [totalSizeCap], current pattern is [[configuration][appender][rollingPolicy][totalSizeCap]]
15:13:24,331 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used
15:13:24,332 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern feedsdk-log.%d{yyyy-MM-dd}.log for the active file
15:13:24,335 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'feedsdk-log.%d{yyyy-MM-dd}.log'.
15:13:24,335 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
15:13:24,340 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Tue Mar 26 13:08:51 CET 2019
15:13:24,340 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
15:13:24,341 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: ./feed-sdk-log.log
15:13:24,341 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [./feed-sdk-log.log]
15:13:24,341 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
15:13:24,341 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
15:13:24,342 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
15:13:24,342 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
15:13:24,343 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1b68ddbd - Registering current configuration as safe fallback point

null
Exception in thread "main" java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:221)
    at java.base/java.util.Arrays$ArrayList.<init>(Arrays.java:4323)
    at java.base/java.util.Arrays.asList(Arrays.java:4310)
    at com.ebay.feed.cli.FeedCli.main(FeedCli.java:219)
shankar-ganesh-ebay commented 5 years ago

@AskaoAhmedSaad I apologize for the delay in the response. It looks like a bug when assigning the level 2 categories, specifically in line 204-206 in FeedCli.java. @skumaravelayutham Could you please take a look and release a fix for this ?

shankar-ganesh-ebay commented 5 years ago

@skumaravelayutham Could you please review this PR for the fix - https://github.com/eBay/FeedSDK/pull/6