ctubbsii commented on a change in pull request #270:
URL: https://github.com/apache/fluo-uno/pull/270#discussion_r620874070



##########
File path: plugins/accumulo-encryption.sh
##########
@@ -26,4 +26,5 @@ accumulo_conf=$ACCUMULO_HOME/conf/accumulo.properties
 encrypt_key=$ACCUMULO_HOME/conf/data-encryption.key
 openssl rand -out $encrypt_key 32
 echo "instance.crypto.opts.key.uri=file://$encrypt_key" >> "$accumulo_conf"
-echo 
"instance.crypto.service=org.apache.accumulo.core.cryptoImpl.AESCryptoService" 
>> "$accumulo_conf"
+jar -tvf $ACCUMULO_HOME/lib/accumulo-core-2.*.jar | grep -qi 
org.apache.accumulo.core.cryptoImpl.AESCryptoService && echo 
"instance.crypto.service=org.apache.accumulo.core.cryptoImpl.AESCryptoService" 
>> "$accumulo_conf" && exit 0
+jar -tvf $ACCUMULO_HOME/lib/accumulo-core-2.*.jar | grep -qi 
org.apache.accumulo.core.spi.crypto.AESCryptoService && echo 
"instance.crypto.service=org.apache.accumulo.core.spi.crypto.AESCryptoService" 
>> "$accumulo_conf"

Review comment:
       Rather than dump the jar file listing twice, could do something to match 
either case in the same line (haven't tested, but something similar should 
work):
   
   ```suggestion
   echo "instance.crypto.service=$(jar -tvf 
"$ACCUMULO_HOME"/lib/accumulo-core-2.*.jar | grep -o 
'org.apache.accumulo.core.*AESCryptoService' | tr / .)" >> "$accumulo_conf"
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to