public static boolean verifyEmptyCurStateFile(String clusterName,
String resourceName,
Set<String> instanceNames,
FilePropertyStore<ZNRecord> filePropertyStore)
{
DataAccessor accessor = new FileDataAccessor(filePropertyStore, clusterName);
for (String instanceName : instanceNames)
{
String path =
PropertyPathConfig.getPath(PropertyType.CURRENTSTATES,
clusterName,
instanceName);
List<String> subPaths =
accessor.getChildNames(PropertyType.CURRENTSTATES, instanceName);
for (String previousSessionId : subPaths)
{
if (filePropertyStore.exists(path + "/" + previousSessionId + "/" + resourceName))
{
CurrentState previousCurrentState =
accessor.getProperty(CurrentState.class,
PropertyType.CURRENTSTATES,
instanceName,
previousSessionId,
resourceName);