HDDS-4601. envtoconf broken for .conf and few other formats#1712
HDDS-4601. envtoconf broken for .conf and few other formats#1712adoroszlai merged 2 commits intoapache:masterfrom
Conversation
|
(Answering the part of your comment from #1667 relevant to this PR.)
@fapifta Here's a Python REPL session to show what's going on: >>> props = {"key": "value"}
>>> props
{'key': 'value'}
>>> props.keys()
['key']
>>> props.values()
['value']
>>> props.items()
[('key', 'value')]
>>> for x in props: print x
...
key
>>> for x in props.keys(): print x
...
key
>>> for x, y in props: print "{}={}".format(x, y)
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: too many values to unpack
>>> for x, y in props.items(): print "{}={}".format(x, y)
...
key=value
>>>
Already used correctly in ozone/hadoop-ozone/dist/src/main/dockerlibexec/transformation.py Lines 81 to 85 in cbe8651 |
|
Thank you for making it clear what the exact problem is. |
|
Thanks @fapifta for the review. |
What changes were proposed in this pull request?
Fix
envtoconffor some output formats that are currently broken. These are not used in Ozone, nor covered by tests. The problem may be accidentally triggered by specific environment variable names, eg.HBASE_CONF_DIRor similar.https://issues.apache.org/jira/browse/HDDS-4601
How was this patch tested?
Test:
Output: