@Override public void closeSession(SparkSession sparkSession) throws HiveException { if (sparkSession == null) { return; } if (LOG.isDebugEnabled()) { LOG.debug(String.format("Closing Spark session (%s).", sparkSession.getSessionId())); } sparkSession.close(); createdSessions.remove(sparkSession); }
@Override public void closeSession(SparkSession sparkSession) throws HiveException { if (sparkSession == null) { return; } if (LOG.isDebugEnabled()) { LOG.debug(String.format("Closing session (%s).", sparkSession.getSessionId())); } sparkSession.close(); createdSessions.remove(sparkSession); }
@Override public void shutdown() { LOG.info("Closing the session manager."); synchronized (createdSessions) { Iterator<SparkSession> it = createdSessions.iterator(); while (it.hasNext()) { SparkSession session = it.next(); session.close(); } createdSessions.clear(); } inited = false; SparkClientFactory.stop(); } }
private void closeSparkSession(SparkSession session) throws ReflectiveOperationException { Assert.assertTrue(session.isOpen()); session.close(); Assert.assertFalse(session.isOpen()); }
@Override public void shutdown() { LOG.info("Closing the session manager."); if (createdSessions != null) { synchronized (createdSessions) { Iterator<SparkSession> it = createdSessions.iterator(); while (it.hasNext()) { SparkSession session = it.next(); session.close(); } createdSessions.clear(); } } inited.set(false); SparkClientFactory.stop(); } }
@Override public void closeSession(SparkSession sparkSession) throws HiveException { if (sparkSession == null) { return; } if (LOG.isDebugEnabled()) { LOG.debug(String.format("Closing session (%s).", sparkSession.getSessionId())); } sparkSession.close(); createdSessions.remove(sparkSession); }