|
@@ -15,6 +15,7 @@
|
|
|
# See the License for the specific language governing permissions and
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
+import logging
|
|
|
import os.path
|
|
import os.path
|
|
|
import sys
|
|
import sys
|
|
|
import beeswax.hive_site
|
|
import beeswax.hive_site
|
|
@@ -25,6 +26,8 @@ from desktop.lib.conf import ConfigSection, Config, coerce_bool
|
|
|
|
|
|
|
|
from beeswax.settings import NICE_NAME
|
|
from beeswax.settings import NICE_NAME
|
|
|
|
|
|
|
|
|
|
+LOG = logging.getLogger(__name__)
|
|
|
|
|
+
|
|
|
|
|
|
|
|
HIVE_SERVER_HOST = Config(
|
|
HIVE_SERVER_HOST = Config(
|
|
|
key="hive_server_host",
|
|
key="hive_server_host",
|
|
@@ -141,7 +144,10 @@ def config_validator(user):
|
|
|
server = dbms.get(user)
|
|
server = dbms.get(user)
|
|
|
server.get_databases()
|
|
server.get_databases()
|
|
|
except:
|
|
except:
|
|
|
- res.append((NICE_NAME, _("The application won't work without a running HiveServer2.")))
|
|
|
|
|
|
|
+ msg = "The application won't work without a running HiveServer2."
|
|
|
|
|
+ LOG.exception(msg)
|
|
|
|
|
+
|
|
|
|
|
+ res.append((NICE_NAME, _(msg)))
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
|
from hadoop import cluster
|
|
from hadoop import cluster
|
|
@@ -149,6 +155,9 @@ def config_validator(user):
|
|
|
fs = cluster.get_hdfs()
|
|
fs = cluster.get_hdfs()
|
|
|
fs.stats(warehouse)
|
|
fs.stats(warehouse)
|
|
|
except Exception:
|
|
except Exception:
|
|
|
- return [(NICE_NAME, _('Failed to access Hive warehouse: %s') % warehouse)]
|
|
|
|
|
|
|
+ msg = 'Failed to access Hive warehouse: %s'
|
|
|
|
|
+ LOG.exception(msg % warehouse)
|
|
|
|
|
+
|
|
|
|
|
+ return [(NICE_NAME, _(msg) % warehouse)]
|
|
|
|
|
|
|
|
return res
|
|
return res
|