如何扫描hbase中的数值范围(How to scan a numeric range in hbase)
我在hbase中的行键是不同长度的数字,如1,2,3 ..... 32423480,32423481 ..
我用的时候
scan 'table' {STARTROW => '1', ENDROW => '3'}
扫描表,我只想要行1,2,3的结果,但它返回所有以1,2,3开头的行,如1003423,200034 ..
是否可以使用数字方式过滤行键范围使用hbase shell或java api?
谢谢
My row key in hbase is numbers with different length, like 1,2,3.....32423480, 32423481..
When I use
scan 'table' {STARTROW => '1', ENDROW => '3'}
to scan the table, I only want result with the row key 1,2,3, but it returns all the rows that start with 1,2,3, like 1003423,200034..
Is it possible to filter the row key range in numeric way use hbase shell or java api?
Thanks
原文:https://stackoverflow.com/questions/40497056
最满意答案
正如Yan在他的回答中指出的那样,你可以使用标准的BSD风格的网络API,如
socket()
,connect()
等。但是,如果你想留在Objective C和Foundation,那么你正在寻找NSInputStream
和NSOutputStream
,这是Cocoa的流类。 但是,您不应该将NSSocketPort
视为专门用于分布式对象。Apple的“Cocoa流编程指南简介”在这里: http : //developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Streams/Streams.html
您应该从该文档开始,然后查看类引用,这些类引用具有指向使用
NSStream
及其子类的示例代码项目的指针。As Yan notes in his answer, you could use the standard BSD-style networking APIs like
socket()
,connect()
, etc. However, if you want to stay in Objective C and Foundation, then you're looking forNSInputStream
andNSOutputStream
, which are the stream classes for Cocoa. You should not, however, look atNSSocketPort
as that's specifically for use with Distributed Objects.Apple's "Introduction to Stream Programming Guide for Cocoa" is here: http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Streams/Streams.html
You should start with that document and then check out the class references which have pointers to sample code projects which use
NSStream
and its subclasses.
相关问答
更多-
对于OSX> = 10.6使用NSWorkSpace : -desktopImageURLForScreen: -setDesktopImageURL:forScreen:options:error: 对于基于CFPreferences的解决方案,请参阅topdraw来源 : CFStringRef appID = CFSTR("com.apple.desktop"); CFStringRef bkg = CFSTR("Background"); // get: NSDictionary *origB ...
-
以编程方式插入Unicode(Objective-C / OSX)(Inserting Unicode programmatically (Objective-C / OSX))[2023-11-13]
发现它,使用CGEventKeyboardSetUnicodeString : // UniChar is a UTF8 codepoint. insertChar(UniChar c) { UniChar cs[1]; cs[0] = c; CGEventSourceRef s = CGEventSourceCreate(kCGEventSourceStateHIDSystemState); CGEventRef e = CGEventCreateKeyboardEvent(s, 0, tru ... -
您已经将C和Objective C结合起来了。不需要额外的努力。 You already are combining C and Objective C. No extra effort is needed.
-
在OS X上,可以使用pthread.h中定义的pthread_threadid_np。 注意_np后缀表明它是POSIX的扩展。 On OS X pthread_threadid_np, defined in pthread.h, can be used. Note the _np suffix suggests that it is an extension to POSIX.
-
有多种选择。 启动 C 服务 Cocoa中的NSWorkspace和NSTask 。 open命令行实用程序。 There are a variety of options. Launch Services for C. NSWorkspace & NSTask in Cocoa. The open command-line utility.
-
您发布的链接在第三段中有您的问题的答案: 请确保您的计算机上安装了了解有关C ++的有效许可证。 在Windows上,请确保路径包含目录(通常为C:\ Program Files \ STI \ bin \ pc-win32)。 在Linux上,请将环境变量STI_HOME设置为理解安装的顶部 。 我发现一位日本导游说 [对于Linux] 安装了Learnnd 2.0之后,请将{Understanding 2.0安装目录} / scitools $设置为STI_HOME系统环境变量。 启动($ {Latti ...
-
正如Yan在他的回答中指出的那样,你可以使用标准的BSD风格的网络API,如socket() , connect()等。但是,如果你想留在Objective C和Foundation,那么你正在寻找NSInputStream和NSOutputStream ,这是Cocoa的流类。 但是,您不应该将NSSocketPort视为专门用于分布式对象。 Apple的“Cocoa流编程指南简介”在这里: http : //developer.apple.com/library/ios/#documentation/c ...
-
目标c - 如何在Mac OSX Lion中使用恢复功能(Objective c - How do you use the resume function in Mac OSX lion)[2024-03-19]
另外,请查看Lion WWDC会话中的恢复和自动终止 。 Also, check out the Resume and Automatic Termination in Lion WWDC session. -
LD_LIBRARY_PATH中有一个错误的路径。 可以通过运行export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib ; gem install mysql2临时为该shell设置它export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib ; gem install mysql2 export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib ; gem install mysql2 。 但是,可能建议 ...
-
您是否看过NSWindow类引用的“创建Windows”部分 - 它几乎告诉您有关以编程方式创建窗口的所有信息。 此外,还有很多示例代码(请参阅上面链接顶部的“相关示例代码”部分),如果您在示例之后。 Have you taken a look at the "Creating Windows" section of the NSWindow class reference - it tells you pretty much all you need to know about creating wind ...