[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114632468
  
 Merged build triggered.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114632522
  
Merged build started.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114644610
  
  [Test build #35585 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35585/console)
 for   PR 6912 at commit 
[`0e3a74e`](https://github.com/apache/spark/commit/0e3a74ed2a701d79e959875057744a4c2a01746b).
 * This patch **fails Spark unit tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114632974
  
  [Test build #35585 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35585/consoleFull)
 for   PR 6912 at commit 
[`0e3a74e`](https://github.com/apache/spark/commit/0e3a74ed2a701d79e959875057744a4c2a01746b).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114644665
  
Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114649933
  
  [Test build #35599 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35599/consoleFull)
 for   PR 6912 at commit 
[`0e3a74e`](https://github.com/apache/spark/commit/0e3a74ed2a701d79e959875057744a4c2a01746b).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread yhuai
Github user yhuai commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114649382
  
test this please.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114649721
  
 Merged build triggered.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114649785
  
Merged build started.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread ericl
Github user ericl commented on a diff in the pull request:

https://github.com/apache/spark/pull/6912#discussion_r33114226
  
--- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
@@ -136,12 +137,62 @@ private[hive] class ClientWrapper(
 
   // TODO: should be a def?s
   // When we create this val client, the HiveConf of it (conf) is the one 
associated with state.
-  private val client = Hive.get(conf)
+  @GuardedBy(this)
+  private var client = Hive.get(conf)
+
+  // We use hive's conf for compatibility.
+  private val retryLimit = 
conf.getIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES)
+  private val retryDelayMillis = 
shim.getMetastoreClientConnectRetryDelayMillis(conf)
+
+  /**
+   * Runs `f` with multiple retries in case the hive metastore is 
temporarily unreachable.
+   */
+  private def retryLocked[A](f: = A): A = synchronized {
+// Hive sometimes retries internally, so set a deadline to avoid 
compounding delays.
+val deadline = System.nanoTime + (retryLimit * retryDelayMillis * 
1e6).toLong
+var numTries = 0
+var caughtException: Exception = null
+do {
+  numTries += 1
+  try {
+return f
+  } catch {
+case e: Exception if causedByThrift(e) =
+  caughtException = e
+  logWarning(
+HiveClientWrapper got thrift exception, destroying client and 
retrying  +
+  s(${retryLimit - numTries} tries remaining), e)
+  Thread.sleep(retryDelayMillis)
+  try {
+client = Hive.get(conf, true)
--- End diff --

Done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114710916
  
Merged build started.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114710904
  
 Merged build triggered.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114712668
  
  [Test build #35628 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35628/consoleFull)
 for   PR 6912 at commit 
[`2d54b55`](https://github.com/apache/spark/commit/2d54b552ef0517f56360cb02c8cf5a95fb484ad9).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114729535
  
Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114729501
  
  [Test build #35628 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35628/console)
 for   PR 6912 at commit 
[`2d54b55`](https://github.com/apache/spark/commit/2d54b552ef0517f56360cb02c8cf5a95fb484ad9).
 * This patch **passes all tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread yhuai
Github user yhuai commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114731672
  
LGTM. I am merging this to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/6912


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114675063
  
  [Test build #35599 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35599/console)
 for   PR 6912 at commit 
[`0e3a74e`](https://github.com/apache/spark/commit/0e3a74ed2a701d79e959875057744a4c2a01746b).
 * This patch **passes all tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114675079
  
Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread yhuai
Github user yhuai commented on a diff in the pull request:

https://github.com/apache/spark/pull/6912#discussion_r33110240
  
--- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
@@ -136,12 +137,62 @@ private[hive] class ClientWrapper(
 
   // TODO: should be a def?s
   // When we create this val client, the HiveConf of it (conf) is the one 
associated with state.
-  private val client = Hive.get(conf)
+  @GuardedBy(this)
+  private var client = Hive.get(conf)
+
+  // We use hive's conf for compatibility.
+  private val retryLimit = 
conf.getIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES)
+  private val retryDelayMillis = 
shim.getMetastoreClientConnectRetryDelayMillis(conf)
+
+  /**
+   * Runs `f` with multiple retries in case the hive metastore is 
temporarily unreachable.
+   */
+  private def retryLocked[A](f: = A): A = synchronized {
+// Hive sometimes retries internally, so set a deadline to avoid 
compounding delays.
+val deadline = System.nanoTime + (retryLimit * retryDelayMillis * 
1e6).toLong
+var numTries = 0
+var caughtException: Exception = null
+do {
+  numTries += 1
+  try {
+return f
+  } catch {
+case e: Exception if causedByThrift(e) =
+  caughtException = e
+  logWarning(
+HiveClientWrapper got thrift exception, destroying client and 
retrying  +
+  s(${retryLimit - numTries} tries remaining), e)
+  Thread.sleep(retryDelayMillis)
+  try {
+client = Hive.get(conf, true)
--- End diff --

If we call this method from a different thread than the one created this 
client wrapper, the conf may be different (the class loader associated with the 
conf may be different). Let me think about the potential impact of this change.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-23 Thread yhuai
Github user yhuai commented on a diff in the pull request:

https://github.com/apache/spark/pull/6912#discussion_r33110812
  
--- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
@@ -136,12 +137,62 @@ private[hive] class ClientWrapper(
 
   // TODO: should be a def?s
   // When we create this val client, the HiveConf of it (conf) is the one 
associated with state.
-  private val client = Hive.get(conf)
+  @GuardedBy(this)
+  private var client = Hive.get(conf)
+
+  // We use hive's conf for compatibility.
+  private val retryLimit = 
conf.getIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES)
+  private val retryDelayMillis = 
shim.getMetastoreClientConnectRetryDelayMillis(conf)
+
+  /**
+   * Runs `f` with multiple retries in case the hive metastore is 
temporarily unreachable.
+   */
+  private def retryLocked[A](f: = A): A = synchronized {
+// Hive sometimes retries internally, so set a deadline to avoid 
compounding delays.
+val deadline = System.nanoTime + (retryLimit * retryDelayMillis * 
1e6).toLong
+var numTries = 0
+var caughtException: Exception = null
+do {
+  numTries += 1
+  try {
+return f
+  } catch {
+case e: Exception if causedByThrift(e) =
+  caughtException = e
+  logWarning(
+HiveClientWrapper got thrift exception, destroying client and 
retrying  +
+  s(${retryLimit - numTries} tries remaining), e)
+  Thread.sleep(retryDelayMillis)
+  try {
+client = Hive.get(conf, true)
--- End diff --

How about we use the hive conf returned by `state.getConf`. This is the 
conf we used to created the original `client`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-22 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114338520
  
Merged build started.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-22 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114338475
  
 Merged build triggered.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-22 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114338668
  
  [Test build #35512 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35512/consoleFull)
 for   PR 6912 at commit 
[`980b3e5`](https://github.com/apache/spark/commit/980b3e57b505878bd50bda35ca877ea24563128e).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-22 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114361188
  
Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-22 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-114361096
  
  [Test build #35512 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35512/console)
 for   PR 6912 at commit 
[`980b3e5`](https://github.com/apache/spark/commit/980b3e57b505878bd50bda35ca877ea24563128e).
 * This patch **passes all tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-113677840
  
Merged build started.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-113677726
  
 Merged build triggered.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread ericl
Github user ericl commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-113676454
  
@yhuai 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread ericl
GitHub user ericl opened a pull request:

https://github.com/apache/spark/pull/6912

[SPARK-6749] [SQL] Make metastore client robust to underlying socket 
connection loss

This works around a bug in the underlying RetryingMetaStoreClient 
(HIVE-10384) by refreshing the metastore client on thrift exceptions. We 
attempt to emulate the proper hive behavior by retrying only as configured by 
hiveconf.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ericl/spark spark-6749

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/6912.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #6912


commit 7c8ee1691e76545dab5cfe9101e3ecf290117818
Author: Eric Liang e...@databricks.com
Date:   2015-06-19T23:50:57Z

Work around RetryingMetaStoreClient bug




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-113678839
  
  [Test build #35340 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35340/consoleFull)
 for   PR 6912 at commit 
[`7c8ee16`](https://github.com/apache/spark/commit/7c8ee1691e76545dab5cfe9101e3ecf290117818).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread yhuai
Github user yhuai commented on a diff in the pull request:

https://github.com/apache/spark/pull/6912#discussion_r32880332
  
--- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
@@ -136,12 +137,63 @@ private[hive] class ClientWrapper(
 
   // TODO: should be a def?s
   // When we create this val client, the HiveConf of it (conf) is the one 
associated with state.
-  private val client = Hive.get(conf)
+  @GuardedBy(this)
+  private var client = Hive.get(conf)
+
+  // We use hive's conf for compatibility.
+  private val retryLimit = 
conf.getIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES)
+  private val retryDelayMillis = 1000 * conf.getIntVar(
+HiveConf.ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY)
--- End diff --

oh, Hive 0.14 changed it to
```

METASTORE_CLIENT_CONNECT_RETRY_DELAY(hive.metastore.client.connect.retry.delay,
 1s,
new TimeValidator(TimeUnit.SECONDS),
Number of seconds for the client to wait between consecutive 
connection attempts),
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-113688246
  
  [Test build #35340 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/35340/console)
 for   PR 6912 at commit 
[`7c8ee16`](https://github.com/apache/spark/commit/7c8ee1691e76545dab5cfe9101e3ecf290117818).
 * This patch **fails Spark unit tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-6749] [SQL] Make metastore client robus...

2015-06-19 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/6912#issuecomment-113688292
  
Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org