<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25458#M17699</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It looks like you need a particular method "directExecutor" which doesn't exist on default cluster jars. Did you try to replace the jar or only remove the Guava 15 jar? If the latter, that would explain the cluster start failure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going through Guava API docs, the directExecutor() method shows up in later versions in the MoreExecutors class. For example, you can see it here in version 19 &lt;A href="https://guava.dev/releases/19.0/api/docs/com/google/common/util/concurrent/MoreExecutors.htmland" target="test_blank"&gt;https://guava.dev/releases/19.0/api/docs/com/google/common/util/concurrent/MoreExecutors.htmland&lt;/A&gt; after in version 23: &lt;A href="https://guava.dev/releases/23.0/api/docs/" target="test_blank"&gt;https://guava.dev/releases/23.0/api/docs/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing a little searching it looks like later version of this jar may break some backwards compatibility.  The earliest version this method exists is in 18.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To ensure you replace the jar, you should try the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download maybe version 18 or 19. There should be links in github for it. &lt;/LI&gt;&lt;LI&gt;Follow these directions to upload the new jar to DBFS: &lt;A href="https://docs.databricks.com/libraries/workspace-libraries.html" target="test_blank"&gt;https://docs.databricks.com/libraries/workspace-libraries.html&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Follow the KB article you posted to create a cluster-scoped init script to remove the guava 15 jar and copy your new guava 18/19 jar to /databricks/jars/&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just like the warning said in the KB article, it will require testing and might not work due to dependencies and other jars' limitations. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2022 20:36:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-04-12T20:36:58Z</dc:date>
    <item>
      <title>NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor</title>
      <link>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25457#M17698</link>
      <description>&lt;P&gt;When I execute a function in &lt;B&gt;google-cloud-bigquery:2.7.0&lt;/B&gt; jar, it executes a function in &lt;B&gt;gax:2.12.2&lt;/B&gt; jar and then this gax jar file executes a function in &lt;B&gt;guava &lt;/B&gt;jar. And this guava jar file is a Databricks default library which is located at &lt;B&gt;/databricks/jars/----workspace_spark_3_2--maven-trees--hive-2.3__hadoop-3.2--com.google.guava--guava--com.google.guava__guava__15.0.jar.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;But the problem is this guava:15.0 jar file doesn't have the function &lt;B&gt;directExecutor&lt;/B&gt;, it keeps giving me this error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;
	at com.google.api.gax.retrying.BasicRetryingFuture.&amp;lt;init&amp;gt;(BasicRetryingFuture.java:88)
	at com.google.api.gax.retrying.DirectRetryingExecutor.createFuture(DirectRetryingExecutor.java:86)
	at com.google.api.gax.retrying.DirectRetryingExecutor.createFuture(DirectRetryingExecutor.java:73)
	at com.google.cloud.bigquery.BigQueryRetryHelper.run(BigQueryRetryHelper.java:85)
	at com.google.cloud.bigquery.BigQueryRetryHelper.runWithRetries(BigQueryRetryHelper.java:49)
	at com.google.cloud.bigquery.BigQueryImpl.create(BigQueryImpl.java:365)
	at com.google.cloud.bigquery.BigQueryImpl.create(BigQueryImpl.java:345)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried to remove this default guava jar file by following this document (&lt;A href="https://kb.databricks.com/libraries/replace-default-jar-new-jar.html" alt="https://kb.databricks.com/libraries/replace-default-jar-new-jar.html" target="_blank"&gt;https://kb.databricks.com/libraries/replace-default-jar-new-jar.html&lt;/A&gt;), &lt;/P&gt;&lt;P&gt;but once I did this, &lt;/P&gt;&lt;P&gt;I got this error below and couldn't start my cluster.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Cluster terminated.Reason:Spark error
&amp;nbsp;
Spark encountered an error on startup. This issue can be caused by invalid Spark configurations or malfunctioning init scripts. Please refer to the Spark driver logs to troubleshoot this issue, and contact Databricks if the problem persists.
&amp;nbsp;
Internal error message: Spark error: Driver down&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In conclusion, my goal is TO UPGRADE THE GUAVA JAR FILE VERSION.&lt;/P&gt;&lt;P&gt;How could I fix this problem?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 08:07:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25457#M17698</guid>
      <dc:creator>lily1</dc:creator>
      <dc:date>2022-03-16T08:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor</title>
      <link>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25458#M17699</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It looks like you need a particular method "directExecutor" which doesn't exist on default cluster jars. Did you try to replace the jar or only remove the Guava 15 jar? If the latter, that would explain the cluster start failure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going through Guava API docs, the directExecutor() method shows up in later versions in the MoreExecutors class. For example, you can see it here in version 19 &lt;A href="https://guava.dev/releases/19.0/api/docs/com/google/common/util/concurrent/MoreExecutors.htmland" target="test_blank"&gt;https://guava.dev/releases/19.0/api/docs/com/google/common/util/concurrent/MoreExecutors.htmland&lt;/A&gt; after in version 23: &lt;A href="https://guava.dev/releases/23.0/api/docs/" target="test_blank"&gt;https://guava.dev/releases/23.0/api/docs/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing a little searching it looks like later version of this jar may break some backwards compatibility.  The earliest version this method exists is in 18.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To ensure you replace the jar, you should try the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download maybe version 18 or 19. There should be links in github for it. &lt;/LI&gt;&lt;LI&gt;Follow these directions to upload the new jar to DBFS: &lt;A href="https://docs.databricks.com/libraries/workspace-libraries.html" target="test_blank"&gt;https://docs.databricks.com/libraries/workspace-libraries.html&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Follow the KB article you posted to create a cluster-scoped init script to remove the guava 15 jar and copy your new guava 18/19 jar to /databricks/jars/&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just like the warning said in the KB article, it will require testing and might not work due to dependencies and other jars' limitations. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 20:36:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25458#M17699</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-12T20:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor</title>
      <link>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25459#M17700</link>
      <description>&lt;P&gt;I solved this issue by following the KB article with guava-20.0 (guava-19.0 didn't work).&lt;/P&gt;&lt;P&gt;&amp;nbsp;But I appreciate your effort and reply.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 12:13:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25459#M17700</guid>
      <dc:creator>lily1</dc:creator>
      <dc:date>2022-04-13T12:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor</title>
      <link>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25460#M17701</link>
      <description>&lt;P&gt;Hey there @Lily Kim​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are doing well!&lt;/P&gt;&lt;P&gt;Thank you for posting your question. We are happy that you were able to find the solution.&lt;/P&gt;&lt;P&gt;Would you please like to mark the answer as best?&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 13:32:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/nosuchmethoderror-com-google-common-util-concurrent/m-p/25460#M17701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-14T13:32:36Z</dc:date>
    </item>
  </channel>
</rss>

