首页 \ 问答 \ Hbase日期范围(Hbase Date Range)

Hbase日期范围(Hbase Date Range)

我是hbase的新手。我在Hbase中有一个名为date的列。我需要创建一个查询,它将在日期范围之间返回数据。 例如 - 20140501,20140502,20140506。 这些是日期和查询应该在20140501到20140506之间的日期之间给出结果。该查询应该在hbase shell中运行。 我尝试过以下查询,该查询将给出该特定日期的结果。 但我需要在两个日期之间检查范围。 查询:

scan 'samlpe_test', {COLUMNS => ['Info'],FILTER => "(SingleColumnValueFilter('Info','date',=,'binary:20140102',true,false)) AND (SingleColumnValueFilter('Info','gender',=,'binary:female',true,false))"}

I am new to hbase.I have a column named date in Hbase.I need to create a query which will return me data between the Range of date. E.g- 20140501,20140502,20140506. These are the dates and query should give the result between the dates like 20140501 to 20140506. That query should run in hbase shell. I have tried following query which will give the result of that particular date. but I need range to be checked between two dates. Query:

scan 'samlpe_test', {COLUMNS => ['Info'],FILTER => "(SingleColumnValueFilter('Info','date',=,'binary:20140102',true,false)) AND (SingleColumnValueFilter('Info','gender',=,'binary:female',true,false))"}

原文:https://stackoverflow.com/questions/31803093
更新时间:2024-05-15 19:05

最满意答案

模仿提供的代码似乎工作:

HTML

<a class="fancybox" href="http://picsofcanada.com/wp-content/uploads/2014/03/11wwartsuewilkinslooktothecoast.jpg"
style='width:50px;'> 
<!-- Note that FancyBox ignores this width styling -->
<img src="http://picsofcanada.com/wp-content/uploads/2014/03/11wwartsuewilkinslooktothecoast-150x150.jpg" alt="" /><br>
<b>Click to trigger Fancybox</b></div>

jQuery的

$(document).ready(function () {
    $('.fancybox').fancybox({
       padding: 0,
       type        : 'image',
       openEffect  : 'none',
       closeEffect : 'none'
    });
});

这个演示

所以你应该尝试让它运作起来:

  1. 使用最新版本的jQuery和最新版本的fancybox。 有时版本存在问题。
  2. 确保实际加载了fancybox.js
  3. 以完整的http://..格式指定图像链接

我想如果你遵循所有这些要点,它就会奏效。 否则,请检查是否有任何其他插件导致fancybox出现问题。


An imitation of the supplied code seems to work:

HTML

<a class="fancybox" href="http://picsofcanada.com/wp-content/uploads/2014/03/11wwartsuewilkinslooktothecoast.jpg"
style='width:50px;'> 
<!-- Note that FancyBox ignores this width styling -->
<img src="http://picsofcanada.com/wp-content/uploads/2014/03/11wwartsuewilkinslooktothecoast-150x150.jpg" alt="" /><br>
<b>Click to trigger Fancybox</b></div>

jQuery

$(document).ready(function () {
    $('.fancybox').fancybox({
       padding: 0,
       type        : 'image',
       openEffect  : 'none',
       closeEffect : 'none'
    });
});

See this demo.

So things you should try to get it working:

  1. Use the latest version of jQuery and the latest version of fancybox. Sometimes there are problems with the versions.
  2. Make sure that fancybox.js is actually loaded
  3. Specify your image links in the full http://.. format

I think if you follow all these points, it'll work. Otherwise, check if any of the other plugins cause problems with fancybox.

相关问答

更多
  • 模仿提供的代码似乎工作: HTML
    页面在新窗口中打开还是新选项卡的行为取决于Web浏览器。 实际上, 总是会打开一个新窗口,但您可以将浏览器设置为在新选项卡中打开新窗口。 The behavior whether a page opens up in a new window or a new tab depends on the web browser. Actually there is always a new window opened but you can set your browser to open new windows ...
  • 没有看到你的代码就很难说,所以让我做一个有根据的猜测: 用户成功登录后,很可能不会使用某些sessionId创建cookie。此cookie将在发送到服务器的每个请求中使用,以证明用户确实已经过身份验证。 当您打开新选项卡并且没有创建cookie /会话时,此新应用程序实例不知道用户已登录的其他实例。 你可能想看看这个答案 编辑 也许您正在使用sessionStorage而不是cookies 。 当我读到你的应用程序的行为时,至少我会这么说。 请参阅会话存储的文档 sessionStorage属性允许您访问 ...
  • 你可以使用cookies。 当用户首次打开页面时,您向计算机发送一个cookie,说明PageOpened=true ,当用户在新选项卡中打开它时,检查是否存在cookie with PageOpened=true的cookie with PageOpened=true ,如果有,请在浏览器中打开其他链接。 您可以在第一个站点关闭或用户打开新选项卡等时为您的cookie提供时间限制或销毁它们。 我无法为您提供代码,因为我从未在网络上使用过c#,但这可以让您了解解决方案的可能路径。 PS:作为用户,我也觉得很 ...
  • 我访问了您的网页,并且一旦发现错误就可以重复重现该问题 ,那就是使用Firefox。 首先,这是该问题的参考照片: 请注意,在上面的图像中, Fancybox不在浏览器中居中,而艺术家照片的顶部就在您正在使用的Totem Ticker插件下面。 下一张参考照片是红色框架部分的特写,显示图腾标签正在覆盖物体: 这两个问题是相关的。 要重现FancyBox在页面问题上打开得太低,您需要点击播放几首歌曲的居中较大图像旁边的迷你艺术家图像 ,同时Totem Ticker插件正处于动画制作过程中。 这些参考图像显示了 ...
  • 无法保证浏览器将在哪里打开新的窗口/选项卡。 不同的浏览器以不同的方式打开新窗口/选项卡,并且该行为也可能受浏览器设置的影响。 there's no guarantee where the browser will open that new window/tab. different browsers open new windows/tabs differently, and that behavior can also be affected by browser settings.
  • 试试这个代码 try this code