Пример #1
0
    def legacy_server(self) -> bool:
        """Determine if the server is running a legacy version.

        Legacy versions support different session kinds than newer versions of
        Livy.
        """
        version = self.server_version()
        return version < Version("0.5.0-incubating")
Пример #2
0
 def server_version(self) -> Version:
     """Get the version of Livy running on the server."""
     if self._server_version_cache is None:
         data = self._client.get("/version")
         self._server_version_cache = Version(data["version"])
     return self._server_version_cache
Пример #3
0
 def legacy_server(self) -> bool:
     version = self.server_version()
     return version < Version("0.5.0-incubating")
Пример #4
0
 def server_version(self) -> Version:
     if self._server_version_cache is None:
         data = self._client.get("/version")
         self._server_version_cache = Version(data["version"])
     return self._server_version_cache
Пример #5
0
def test_version_equals(first, second):
    assert Version(first) == Version(second)
Пример #6
0
def test_version_less_than(earlier, later):
    assert Version(earlier) < Version(later)
Пример #7
0
 def server_version(self) -> Version:
     if self._server_version_cache is None:
         data = self._client.get('/version')
         self._server_version_cache = Version(data['version'])
     return self._server_version_cache