关于Ceph的一点疑惑

分布式存储系统简单归类:

中心化: HDFS, GFS

去中心化: Ceph, Swift

 

这里面的hash是如何做到均匀的? 避免HashMap中链表改为红黑树的问题? 一无所知。

 

 

阅读更多

扫码向博主提问

飞火流云

非学,无以致疑;非问,无以广识
  • 擅长领域:
  • 图计算
去开通我的Chat快问

关于aumation的一点疑惑

04-07

MSDN上说,如果你要享受automation带来的乐趣的话,你必须使用autionmation所能兼容的参数类型。现在应用要我实现类似这样的东东rnICardInfornrn get_CardName()..rn set_CardNmae()rn....rn....rn //里面全是一些属性操作rnrn而"我希望"有一个rnICardInfosManagerrnrn CreateCardInfo(ICardInfo **ci);rn...rn...rnrnrn很显然我如果放弃automation的想法,绝对可行,但如果我一定要用automation那rn似乎只有自己将CardInfo定义成UDT,通过SAFEARRAY或者VARIANT来传递,然后通过IRecordInfo来访问,rnrn由此我有个疑问,ADO里面的对象是如何实现的(顺便问一下:它应该是个应用到Automaion的一个例子吧),比如rnrncon.Provider = "MSDAOSP"rncon.Properties("Data Source") = "SampleOSP_VB.MyDataSource"rncon.Openrnrs.Open " C:\Oledbsdk\Osptk\Samples\Customer.txt", conrnrn很显然,RecordSet在调用Open时传递了一个Connection对象con进去了,rn而Connection又不是Automation所兼容的类型,小弟初识COM/ATL,不解其中rn含义,请哪个讲讲rnrn另外小弟还有一个问题rn我在项目的idl里加了一段rntypedef [uuid(6A8EBB1A-57ED-48f4-BE7B-AE74C5206D5A)] struct tag_CardInforn short id;rn CardInfo;rn然后在下面的interface的method定义中rnrninterface ICardInfosManager : IDispatchrnrn [id(1), helpstring("method CreateCardInfo")] HRESULT CreateCardInfo([out]SAFEARRAY(CardInfo) *psa);rn;rnrn在编译时出现了下面的问题rnE:\Works\BT\V1\client\test\2\2.idl(60) : warning MIDL2039 : interface does not conform to [oleautomation] attribute : [ Parameter 'psa' of Procedure 'CreateCardInfo' ( Interface 'ICardInfosManager' ) ]rnrnmidl\oleaut32.dll : warning MIDL2368 : error generating type library, ignored : Could not set UUID : tag_CardInfornrn这又是为何?rnrn烦劳高手指点迷津

关于线程的一点疑惑

06-16

代码1:rn[code=Delphi(Pascal)]rnunit Unit1;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs, StdCtrls;rnrntypern TForm1 = class(TForm)rn Memo1: TMemo;rn Button1: TButton;rn procedure Button1Click(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rn TReadThread=class(TThread)rn privatern Faa:string;rn protectedrn procedure Execute;override;rn publicrn constructor Create(aa:string);rn destructor Destroy; override;rn end;rnvarrn Form1: TForm1;rnrnimplementationrnrn$R *.dfmrnrn TReadThread rnrnconstructor TReadThread.Create(aa: string);rnbeginrn Faa:=aa;rn FreeOnTerminate:=True;rn inherited Create(false);rnend;rnrndestructor TReadThread.Destroy;rnbeginrn Faa:='';rn inherited;rnend;rnrnprocedure TReadThread.Execute;rnbeginrn [color=#FF0000]form1.Memo1.Lines.Add(Faa);[/color]rnrnend;rnrnprocedure TForm1.Button1Click(Sender: TObject);rnbeginrn TReadThread.Create('asdf');rnend;rnrnend.rn[/code]rn这个时候点击按钮向Memo加入‘asdf’没有任何问题rn但是在form2上动态创建后会出问题rn[color=#FF0000]在form1.Memo1.Lines.Add(Faa);断点看到 form1.Memo1=Inaccessible value[/color]rn想知道为什么会出现这种结果rnrn[code=Delphi(Pascal)]rnunit Unit2;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs,Unit1, StdCtrls;rnrntypern TForm2 = class(TForm)rn Button1: TButton;rn procedure Button1Click(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn Form2: TForm2;rn implementationrnrn$R *.dfmrnrnprocedure TForm2.Button1Click(Sender: TObject);rnvar bb:TForm1;rnbeginrn bb:=TForm1.Create(self);rn bb.Parent:=Form2;rn bb.Show;rnend;rnrnend.rn[/code]

没有更多推荐了,返回首页