Details
Description
The following test case failed.
@Test public void testNodeLocalMetrics() throws Exception { Assume.assumeTrue(null == DomainSocket.getLoadingFailureReason()); Configuration conf = new HdfsConfiguration(); conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.KEY, true); TemporarySocketDirectory sockDir = new TemporarySocketDirectory(); DomainSocket.disableBindPathValidation(); conf.set(DFSConfigKeys.DFS_DOMAIN_SOCKET_PATH_KEY, new File(sockDir.getDir(), "testNodeLocalMetrics._PORT.sock").getAbsolutePath()); MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build(); try { cluster.waitActive(); FileSystem fs = cluster.getFileSystem(); Path testFile = new Path("/testNodeLocalMetrics.txt"); long file_len = 10; DFSTestUtil.createFile(fs, testFile, file_len, (short)1, 1L); DFSTestUtil.readFile(fs, testFile); List<DataNode> datanodes = cluster.getDataNodes(); assertEquals(datanodes.size(), 1); DataNode datanode = datanodes.get(0); MetricsRecordBuilder rb = getMetrics(datanode.getMetrics().name()); // Write related metrics assertCounter("WritesFromLocalClient", 1L, rb); // Read related metrics assertCounter("ReadsFromLocalClient", 1L, rb); // failed here } finally { if (cluster != null) { cluster.shutdown(); } } }
Attachments
Issue Links
- links to