Closed soumilshah1995 closed 1 year ago
Hie is there any updates ??
Can you get the log4j logs of your application by configuring log4j.properties? Here is some links I found that may help it setting it up
With the INFO level logs, we will be able to see what io.delta.storage.S3DynamoDBLogStore
class is doing. Is it being correctly loaded or not.
i can try to go to cloud watch and get the logs if thats what you want as mentioned jobs succeeded and does nto throws error
@tdas
2022-11-26T06:13:22.523-05:00
Copy
+------+-----------------+-----------+-----+------+---+-----+----------+
|emp_id| employee_name| department|state|salary|age|bonus| ts|
+------+-----------------+-----------+-----+------+---+-----+----------+
| 4| this is insert 3|Engineering| RJ| 79000| 53|15000|1627694678|
| 2| this is insert 2|Engineering| RJ| 79000| 53|15000|1627694678|
| 3| this is insert 3|Engineering| RJ| 79000| 53|15000|1627694678|
| 5| this is append|Engineering| RJ| 79000| 53|15000|1627694678|
| 1|this is insert 1 | Sales| RJ| 81000| 30|23000| 827307999|
+------+-----------------+-----------+-----+------+---+-----+----------+
READ None
More LOGS
2022-11-26 11:12:45,696 main WARN JNDI lookup class is not available because this JRE does not support JNDI. JNDI string lookups will not be available, continuing configuration. java.lang.ClassNotFoundException: org.apache.logging.log4j.core.lookup.JndiLookup
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.logging.log4j.util.LoaderUtil.loadClass(LoaderUtil.java:173)
at org.apache.logging.log4j.util.LoaderUtil.newInstanceOf(LoaderUtil.java:211)
at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOf(LoaderUtil.java:232)
at org.apache.logging.log4j.core.util.Loader.newCheckedInstanceOf(Loader.java:301)
at org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:95)
at org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(AbstractConfiguration.java:114)
at org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:55)
at org.apache.logging.log4j.core.layout.PatternLayout$Builder.build(PatternLayout.java:430)
at org.apache.logging.log4j.core.layout.PatternLayout.createDefaultLayout(PatternLayout.java:324)
at org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.<init>(ConsoleAppender.java:121)
at org.apache.logging.log4j.core.appender.ConsoleAppender.newBuilder(ConsoleAppender.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.createBuilder(PluginBuilder.java:158)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:119)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:813)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:753)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:745)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:389)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:169)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:181)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:446)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:520)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:536)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:214)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:146)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:41)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:597)
at org.apache.spark.metrics.sink.MetricsConfigUtils.<clinit>(MetricsConfigUtils.java:12)
at org.apache.spark.metrics.sink.MetricsProxyInfo.fromConfig(MetricsProxyInfo.java:17)
at com.amazonaws.services.glue.cloudwatch.CloudWatchLogsAppenderCommon.<init>(CloudWatchLogsAppenderCommon.java:62)
at com.amazonaws.services.glue.cloudwatch.CloudWatchLogsAppenderCommon$CloudWatchLogsAppenderCommonBuilder.build(CloudWatchLogsAppenderCommon.java:79)
at com.amazonaws.services.glue.cloudwatch.CloudWatchAppender.activateOptions(CloudWatchAppender.java:73)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.<init>(Log4jLoggerFactory.java:66)
at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at org.apache.spark.network.util.JavaUtils.<clinit>(JavaUtils.java:41)
at org.apache.spark.internal.config.ConfigHelpers$.byteFromString(ConfigBuilder.scala:67)
at org.apache.spark.internal.config.ConfigBuilder.$anonfun$bytesConf$1(ConfigBuilder.scala:259)
at org.apache.spark.internal.config.ConfigBuilder.$anonfun$bytesConf$1$adapted(ConfigBuilder.scala:259)
at org.apache.spark.internal.config.TypedConfigBuilder.$anonfun$transform$1(ConfigBuilder.scala:101)
at org.apache.spark.internal.config.TypedConfigBuilder.createWithDefault(ConfigBuilder.scala:144)
at org.apache.spark.internal.config.package$.<init>(package.scala:345)
at org.apache.spark.internal.config.package$.<clinit>(package.scala)
at org.apache.spark.SparkConf$.<init>(SparkConf.scala:654)
at org.apache.spark.SparkConf$.<clinit>(SparkConf.scala)
at org.apache.spark.SparkConf.set(SparkConf.scala:94)
at org.apache.spark.SparkConf.$anonfun$loadFromSystemProperties$3(SparkConf.scala:76)
at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:788)
at scala.collection.immutable.HashMap$HashMap1.foreach(HashMap.scala:230)
at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:461)
at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:461)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:787)
at org.apache.spark.SparkConf.loadFromSystemProperties(SparkConf.scala:75)
at org.apache.spark.SparkConf.<init>(SparkConf.scala:70)
at org.apache.spark.SparkConf.<init>(SparkConf.scala:59)
at com.amazonaws.services.glue.SparkProcessLauncherPlugin.getSparkConf(ProcessLauncher.scala:41)
at com.amazonaws.services.glue.SparkProcessLauncherPlugin.getSparkConf$(ProcessLauncher.scala:40)
at com.amazonaws.services.glue.ProcessLauncher$$anon$1.getSparkConf(ProcessLauncher.scala:78)
at com.amazonaws.services.glue.ProcessLauncher.<init>(ProcessLauncher.scala:84)
at com.amazonaws.services.glue.ProcessLauncher.<init>(ProcessLauncher.scala:78)
at com.amazonaws.services.glue.ProcessLauncher$.main(ProcessLauncher.scala:29)
at com.amazonaws.services.glue.ProcessLauncher.main(ProcessLauncher.scala)
Any Updates ??
It seems you're having some issues getting the logs, right? Give the error message above. Would this link help? https://stackoverflow.com/questions/70383503/after-log4j-changes-hive-e-returns-additional-warning-which-has-impact-on-the-s
Hey @soumilshah1995 are you sure this is the only error. This is just a WARNING, not an ERROR that log4j library is printing. We want to see INFO level logs that has "DynamoDBLogStore" in it. Are you getting any log with "INFO" in them? If not, you can set the log level in your code as sparkContext.setLogLevel("INFO")
before any delta operation. Then you should see info-level logs and in that, grep for "LogStore". Then you can share that filtered log with us for debugging.
This is all i have man. please let me know if you want me to include anything specific in code above
Any updates ?
Ho @soumilshah1995 - did you follow TD's suggestion to include sparkContext.setLogLevel("INFO")
in your spark setup?
Also, if you are having specific log4j issues, I would suggest you post in a Spark thread as Spark has a larger community and there will likely be someone there that has already come across your issue.
Thanks a scott we switched to Apache Hudi instead of Delta lakes due to limitations i appreciate the help
Hi @soumilshah1995 I just realized that you are using Delta Lake 1.1.0.
In Delta lake 1.2, we switched to using the delta-storage
module ... to allow custom log stores ... like the DynamoDB log store ...
https://docs.delta.io/latest/porting.html#delta-lake-1-1-or-below-to-delta-lake-1-2-or-above
So, multi-cluster writes aren't working because you aren't using a new enough version of Delta Lake! Please use version 1.2 or above.
Trying out
https://delta.io/blog/2022-05-18-multi-cluster-writes-to-delta-lake-storage-in-s3/ https://docs.google.com/document/d/1Gs4ZsTH19lMxth4BSdwlWjUNR-XhKHicDvBjd2RqNd8/edit#
DynamoDB tables
jar files
jar file path provided
When i run my code i dont see any messages in the dynamodb table here is code
Please advice