首页
\
问答
\
在HDFS中遇到大量文件时,实际理想的NameNode内存大小是多少(what's the actual ideal NameNode memory size when meet a lot files in HDFS)
在HDFS中遇到大量文件时,实际理想的NameNode内存大小是多少(what's the actual ideal NameNode memory size when meet a lot files in HDFS)
我的HDFS集群中将有2亿个文件,我们知道每个文件在NameNode内存中占用150个字节,加上3个块,因此NN中总共有600个字节。 所以我将我的NN内存设置为250GB,以便处理2亿个文件。 我的问题是如此大的内存容量为250GB,会对GC造成太大的压力吗? 为NN创建250GB内存是否可行。
Can someone just say something, why no body answer??
I will have 200 million files in my HDFS cluster, we know each file will occupy 150 bytes in NameNode memory, plus 3 blocks so there are total 600 bytes in NN. So I set my NN memory having 250GB to well handle 200 Million files. My question is that so big memory size of 250GB, will it cause too much pressure on GC ? Is it feasible that creating 250GB Memory for NN.
Can someone just say something, why no body answer??
原文:https://stackoverflow.com/questions/37511278
更新时间:2022-05-12 06:05
最满意答案
只需调用另一种方法:
class Road(object): ... def kappa(self, t): return abs(self.curvature(t=t))
Just call the other method:
class Road(object): ... def kappa(self, t): return abs(self.curvature(t=t))
相关问答
更多-
未被覆盖的公共实例方法是否被动态绑定?(Are public instance methods that are not overridden dynamically bound?)[2023-05-10]
首先,方法签名在编译时确定。 但是,方法绑定总是在运行时完成的。 JLS第15.12.2.5节定义了运行时调度的确切规则。 所以,现在你可能正在猜测, p.something();的调用p.something(); 仍然是有界的。 作为一个旁注,检查这个清楚地理解多态性。 First of all, the method signature is determined at time of compilation. However, method binding is always done at runt ... -
这个答案将是非常技术性的,我希望它仍然可以理解。 问题是它需要知道描述符协议来理解Python中的方法如何工作。 Python 3中的所有函数都是描述符 ,确切而言,它们是非数据描述符。 这意味着他们实现了__get__方法 - 但没有__set__方法。 这很有趣,因为描述符如果在类或实例中查找它们,可以执行(几乎)任何操作。 通过Pythons数据模型中 __get__方法的定义: object.__get__(self, instance, owner) 调用以获取所有者类(类属性访问)的属性或该类的 ...
-
到目前为止,你只创建了一个类。 您还需要创建对象,即该类的实例: Spam = type("Spam", (Foo, ), {"echo":echo}) spam = Spam() spam.echo() 如果你真的希望这是一个类的方法,而不是一个实例方法,用classmethod(而不是staticmethod)包装它。 So far, you only have created a class. You also need to create objects, i.e. instances of th ...
-
@M大提琴,我认为罪魁祸首将在这里“返回新的TimeSpan(开始时间,结束时间);” public ITimeSpan intersectionWith(ITimeSpan timeSpan) { ITime begintime, endtime; if (bt.compareTo(timeSpan.getBeginTime()) > 0) { begintime = bt; } else { begintime = timeSpan.getBeginTime(); } if (et. ...
-
您唯一的解决方案是从业务对象中删除IEditableObject的实现。 CurrencyManager (用于Winforms中的所有绑定)在绑定对象更改时自行执行此操作。 您要么必须更改逻辑以处理更高级别的更改跟踪,要么从类中删除接口,但保留方法。 这样做意味着你每次都必须明确地调用BeginEdit , EndEdit和CancelEdit 。 Your only solution would be to remove the implementation of IEditableObject fro ...
-
首先:如果你使用的是python-3.4,为什么不使用weakref的WeakMethod呢? 无论如何,模拟框架是一个强大的,但有时可能是一个过度的方法,并迫使你太了解你想要测试的东西:副作用可能是你的测试变得太多与实现耦合。 在你的情况下,最好使用真实对象来测试它。 对WeakBoundMethod的完整测试可以是这样的: class TestWeakMethod(unittest.TestCase): def test_call(self): class C(): ...
-
不同之处在于,在第一种方法中, homePoint是一个新的Object,因此更改参数p的坐标不会对字段homePoint产生任何影响。 然而,在第二种方法中, homePoint指向给定的参数p 。 如果在方法之外,您将任何内容更改为参数p ,那么这也将反映在homePoint 。 下面的代码举例说明了这种差异 示例代码 public class Test { public Point homePoint; public static void main(String[] args) { ...
-
python中的绑定方法(bound methods in python)[2022-03-04]
方法只存在于课堂上; 将该函数分配给实例属性,因为您的示例会创建包含该函数的实例属性,而不是方法。 Methods only exist on the class; assigning the function to the instance attribute as your example does creates an instance attribute containing the function, and not a method. -
如何订购@Before方法(How to order @Before methods)[2023-10-06]
这样做的正确方法是使用@Rule ,在类型行为之前和之后扩展@ExternalResource (在Java语法中): @Rule public ExternalResource resource= new ExternalResource() { @Override protected void before() throws Throwable { myServer.connect(); }; @Overr ... -
只需调用另一种方法: class Road(object): ... def kappa(self, t): return abs(self.curvature(t=t)) Just call the other method: class Road(object): ... def kappa(self, t): return abs(self.curvature(t=t))