/** * Checks if the given record was generated by my WASB file system instance. * @param currentRecord The metrics record to check. * @return */ private boolean wasGeneratedByMe(MetricsRecord currentRecord) { String myFsId = fs.getInstrumentation().getFileSystemInstanceId().toString(); for (MetricsTag currentTag : currentRecord.tags()) { if (currentTag.name().equalsIgnoreCase("wasbFileSystemId")) { return currentTag.value().equals(myFsId); } } return false; }
/** * Checks if the given record was generated by my WASB file system instance. * @param currentRecord The metrics record to check. * @return */ private boolean wasGeneratedByMe(MetricsRecord currentRecord) { Assert.assertNotNull("null filesystem", fs); Assert.assertNotNull("null filesystemn instance ID", fs.getInstrumentation().getFileSystemInstanceId()); String myFsId = fs.getInstrumentation().getFileSystemInstanceId().toString(); for (MetricsTag currentTag : currentRecord.tags()) { if (currentTag.name().equalsIgnoreCase("wasbFileSystemId")) { return currentTag.value().equals(myFsId); } } return false; }