Apache2,Git,Capistrano和Rails - 创建符号链接(Apache2, Git, Capistrano & Rails - creating symlinks)
我有点不耐烦地在服务器上添加符号链接到我的应用程序。 我目前在.gitignore中有以下内容:
/非公开/系统/上传/ *
我基本上不希望Git存储上传目录的内容。 到现在为止还挺好。
在我的服务器上,在deploy.rb中,我有以下内容:
namespace :customs do task :symlink, :roles => :app do run <<-CMD ln -nfs #{shared_path}/system/uploads #{release_path}/non-public/system/uploads CMD end end after "deploy:symlink","customs:symlink" after "deploy", "deploy:cleanup"
我想在上传目录的每次部署之后创建符号链接,但是我一直收到失败的错误消息,因为首先在git存储库中不存在非public / system / uploads目录。
我已经通过查看存储库验证了这一点,并且结构/非公共/系统/上传不存在,因为我在.gitignore中设置了忽略它。
我看过Git维基,它没有跟踪目录,所以我必须遗漏一些东西。 其他开发人员如何将uploads目录与他们的服务器进行符号链接?
I'm sort of stuck with adding symlinks to my app on the server. I currently have the following in .gitignore:
/non-public/system/uploads/*
I basically don't want Git to store the contents of the upload directory. So far so good.
On my server, inside my deploy.rb, I have the following:
namespace :customs do task :symlink, :roles => :app do run <<-CMD ln -nfs #{shared_path}/system/uploads #{release_path}/non-public/system/uploads CMD end end after "deploy:symlink","customs:symlink" after "deploy", "deploy:cleanup"
I want to create a symlink after each deployment for the uploads directory, but I keep getting a failed error message because the non-public/system/uploads directory doesn't exist in the git repository in the first place.
I've verified this by taking a look at the repository, and the structure /non-public/system/uploads doesn't exist because I have that set in .gitignore to ignore it.
I've looked at the Git wiki and it doesn't track directories, so I must be missing something. How do other developers symlink the uploads directory with their server?
原文:https://stackoverflow.com/questions/2366174
最满意答案
谢谢你的问题。
目前,BigQueryIO.Read需要“project:dataset:table”格式的表格信息,因此指定装饰器不起作用。
在支持此功能之前,您可以尝试以下方法:
- 运行批处理阶段,提取整个bigquery并过滤掉不必要的数据并处理该数据。 如果表格非常大,如果读取的数据量明显小于数据总量,您可能希望将数据分叉到单独的表中。
- 使用流式数据流。 例如,您可以将数据发布到Pubsub上,并创建一个具有24小时窗口的流式管道。 流媒体管道连续运行,但提供滑动窗口与日常窗口。
希望这可以帮助
Thank you for your question.
At this time, BigQueryIO.Read expects table information in "project:dataset:table" format, so specifying decorators would not work.
Until support for this is in place, you can try the following approaches:
- Run a batch stage which extracts the whole bigquery and filters out unnecessary data and process that data. If the table is really big, you may want to fork the data into a separate table if the amount of data read is significantly smaller than the total amount of data.
- Use streaming dataflow. For example, you may publish the data onto Pubsub, and create a streaming pipeline with a 24hr window. The streaming pipeline runs continuously, but provides sliding windows vs. daily windows.
Hope this helps
相关问答
更多-
在FAQ中找到,目前不支持这些视图。 http://goo.gl/ZVNTnp Found in the FAQ's, that views are not currently supported. http://goo.gl/ZVNTnp
-
我用你的确切模式和输入尝试了一个例子,它为我工作。 我不得不做以下修复。 (1)看起来你没有在你的论点中指定一个项目。 您可能会在管道定义中指定它,因为您没有看到此错误。 (2)您在上面提到的代码中存在拼写错误。 'field_5: 'ExampleData'应该是'field_5': 'ExampleData'但是我假设这只是这个问题中的一个错字,而不是你原来的管道中,因为你没有得到这个错误。 你正在运行最新版本的Dataflow吗? 你可以尝试创建一个新的虚拟环境并运行'pip install goog ...
-
正如@ Pentium10所说,GUI仅用于快速预览。 它需要一些时间来更新自己。 如果你想检查表中的数据是否在查询中。 As @Pentium10 said, the GUI is just for quick previews. It does take some time to update itself. If you want to check if the data is in the table do a query.
-
Google Cloud Dataflow Python --maxNumWorkers(Google Cloud Dataflow Python --maxNumWorkers)[2024-01-03]
看起来在Python中,选项是--max_num_workers 。 It looks like in Python the option is --max_num_workers. -
允许数据流读取指向Drive的BigQuery表?(Permissioning Dataflow to read a BigQuery table that is pointing to Drive?)[2023-11-30]
Dataflow目前不支持从Drive支持的联合表格读取数据,但即将推出。 Dataflow does not currently support reading from a federated table backed by Drive, but this is coming soon. -
数据流到BigQuery配额(Dataflow to BigQuery quota)[2024-01-21]
从您的消息中,听起来您正在批量执行您的管道,而不是流模式。 在批处理模式下 ,在Google Cloud Dataflow服务上运行的作业不使用BigQuery的流式写入。 相反,我们将所有要导入的行写入GCS上的文件,然后调用BigQuery加载“作业” 。请注意,这会降低您的成本(加载作业比流式写入便宜),并且整体效率更高(BigQuery可以更快地执行一个批量加载比做每行导入)。权衡是在整个作业成功完成之前,BigQuery中没有结果可用。 加载作业不受特定行数/秒的限制,而是受每日配额限制 。 在S ... -
什么是BigQuery的表装饰器的Cloud Dataflow等价物?(What is the Cloud Dataflow equivalent of BigQuery's table decorators?)[2022-11-02]
谢谢你的问题。 目前,BigQueryIO.Read需要“project:dataset:table”格式的表格信息,因此指定装饰器不起作用。 在支持此功能之前,您可以尝试以下方法: 运行批处理阶段,提取整个bigquery并过滤掉不必要的数据并处理该数据。 如果表格非常大,如果读取的数据量明显小于数据总量,您可能希望将数据分叉到单独的表中。 使用流式数据流。 例如,您可以将数据发布到Pubsub上,并创建一个具有24小时窗口的流式管道。 流媒体管道连续运行,但提供滑动窗口与日常窗口。 希望这可以帮助 Th ... -
Python目前仅支持FileBasedSource IO的ValueProvider选项。 您可以通过点击您提到的链接上的Python选项卡来查看: https : //cloud.google.com/dataflow/docs/templates/creating-templates 在“管道I / O和运行时参数”部分下。 与Java中发生的不同,Python中的BigQuery不使用自定义源。 换句话说,它没有在SDK中完全实现,但也包含后端的部分(因此它是“本地源”)。 只有自定义源可以使用模板 ...
-
我采取的方法如下: 设置传入记录的窗口 将窗口转换为表名 p.apply(PubsubIO.Read .subscription(subscription) .withCoder(TableRowJsonCoder.of()) ) .apply(Window.into(new TablePartitionWindowFn()) ) .apply(BigQueryIO.Write ...
-
实现此目标的最简单方法是使用BigQuery加载云数据存储备份的功能。 基本上只是将常规备份安排到GCS存储桶中,然后将备份从GCS加载到BigQuery中。 [ 文件 ]。 如果要使用Dataflow,可以使用Java或Python中的DatastoreIO源(对不起,这里没有PHP)。 [ 文件 ] 将查询结果读入PCollection: Pipeline p = Pipeline.create(options); PCollection
entities = p.apply( D ...