Fix QueryStateRecord, when profile is NULL
Fix QueryStateRecord, when profile is NULL

Currently when we instantiate a QueryStateRecord, we assume
that if it's RS and has a coordinator, then it must have a
profile for HDFS scan node. However, this might not be true all
the time, due to the query in a cancellation path, etc.

This removes the NULL check, and makes the code to be more defensive.

Change-Id: I182b85420ef47942529c24096b9e32ff1cf0e2f0
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/8041
Reviewed-by: Nong Li <99a5e5f8f5911755b88e0b536d46aafa102bed41@cloudera.com>
Tested-by: jenkins
Reviewed-by: Chao Sun <67a7c7fa38d7a5d78492d6f0626602205a411205@cloudera.com>

cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice