Преглед изворни кода

HUE-8887 [llap] Use default LocMem cache for now

Breaks Docker currently. Potential issues with file systems setups too.

Ideally we should also use the same type of cache for Default, celery
and LLAP and in general.
Romain пре 6 година
родитељ
комит
31eab13e80

+ 1 - 1
apps/beeswax/src/beeswax/server/rdbms_tests.py

@@ -97,7 +97,7 @@ class TestGetQueryServerConfig():
             assert_equal(query_server['server_name'], 'beeswax')
             assert_equal(query_server['server_host'], 'hive-llap-1.gethue.com')
             # assert_equal(query_server['server_port'], 20000) # Bug Always set to LLAP_SERVER_PORT?
-            assert_equal(query_server['server_port'], 25000) # Bug Always set to LLAP_SERVER_PORT?
+            assert_equal(query_server['server_port'], 25000) # To remove this line and comment above when fixed.
 
     # TODO: all the combinations in new test methods, e.g.:
     # HIVE_DISCOVERY_LLAP_HA.get() --> True

+ 4 - 4
desktop/core/src/desktop/settings.py

@@ -380,15 +380,15 @@ DATABASES = {
 
 CACHES = {
     'default': {
-        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
+        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', # TODO: Parameterize here for all the caches
         'LOCATION': 'unique-hue'
     }
 }
 CACHES_HIVE_DISCOVERY_KEY = 'hive_discovery'
 CACHES[CACHES_HIVE_DISCOVERY_KEY] = {
-        'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
-        'LOCATION': '/{0}/hive_discovery_cache'.format(_config_dir),
-    }
+    'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
+    'LOCATION': CACHES_HIVE_DISCOVERY_KEY
+}
 
 CACHES_CELERY_KEY = 'celery'
 if desktop.conf.TASK_SERVER.ENABLED.get():