{"id":3361,"date":"2017-02-11T03:08:47","date_gmt":"2017-02-11T02:08:47","guid":{"rendered":"http:\/\/www.gamlor.info\/wordpress\/?p=3361"},"modified":"2021-03-11T09:42:56","modified_gmt":"2021-03-11T08:42:56","slug":"joyent-manta-store-and-calculate-kor","status":"publish","type":"post","link":"https:\/\/www.gamlor.info\/wordpress\/2017\/02\/joyent-manta-store-and-calculate-kor\/","title":{"rendered":"Joyent\uc758 \ub9cc\ud0c0 (Manta): \uc800\uc7a5\ud558\uace0 \uacc4\uc0b0\ud558\ub2e4"},"content":{"rendered":"<p>(English version will come out, probably tomorrow =) )<br \/>\n\uc774\uc81c\uae4c\uc9c0 \uc6b0\ub9ac\ub294 Joyent\uc758 <a href=\"https:\/\/www.gamlor.info\/wordpress\/tag\/triton\/\">Triton<\/a> \uc0ac\uc6a9\ud588\uc5b4\uc694. \ud2b8\ub9ac\ud230\uc73c\ub85c Docker \ucee8\ud14c\uc774\ub108\ub97c \ubc30\ud3ec\ud588\uc5b4\uc694. \uc544\ub9c8 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uace0 \uc2f6\uc5b4\uc694. \ub9cc\ud0c0\ub294 \uc544\ub9c8\uc874 S3 \uac19\uc740 \uc2a4\ud1a0\ub9ac\uc9c0 \uc11c\ube44\uc2a4\uc608\uc694. \uadfc\ub370 \ub9cc\ub2e4\ub294 \uacc4\uc0b0\ub3c4 \ud560 \uc218 \uc788\uc5b4\uc694. \uc2dc\uc791\ud558\uc790!<br \/>\n<div id=\"attachment_3413\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/data-store-blog.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3413\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/data-store-blog-1024x646.jpg\" alt=\"\" width=\"700\" height=\"442\" class=\"size-large wp-image-3413\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/data-store-blog-1024x646.jpg 1024w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/data-store-blog-300x189.jpg 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/data-store-blog-768x484.jpg 768w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/data-store-blog.jpg 1624w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><p id=\"caption-attachment-3413\" class=\"wp-caption-text\">\uc800\uc7a5\ub9cc \ud560 \uc218 \uc788\uc73c\uba74 \ub370\uc774\ud130\ub97c \ud56d\uc0c1 \uc804\uc1a1\ud574\uc57c \ub3fc\uc694<\/p><\/div><br \/>\n<div id=\"attachment_3414\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/manta-data-ocean-blog.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3414\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/manta-data-ocean-blog-1024x686.jpg\" alt=\"\" width=\"700\" height=\"469\" class=\"size-large wp-image-3414\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/manta-data-ocean-blog-1024x686.jpg 1024w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/manta-data-ocean-blog-300x201.jpg 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/manta-data-ocean-blog-768x514.jpg 768w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2017\/02\/manta-data-ocean-blog.jpg 1529w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><p id=\"caption-attachment-3414\" class=\"wp-caption-text\">\ub9cc\ud0c0 \uacc4\uc0b0\ud560 \uc218 \uc788\uc5b4\uc11c \ub370\uc774\ub370\uc774\ud130 \uc804\uc1a1 \ud544\uc694 \uc5c6\uc5b4\uc694.<\/p><\/div><\/p>\n<h2>\uc900\ube44\ud558\uc790!<\/h2>\n<p><a href=\"https:\/\/www.joyent.com\/manta\">\ub9cc\ub2e4\ub294 (Manta)<\/a> REST-API\uac00 \uc788\uc5b4\uc694. \uadfc\ub370 \uc6b0\ub9ac\ub294 \uc774 \ube14\ub85c\uadf8 \uae00\uc5d0 \ub9cc\ud0c0\uc758 \uc571\uc744 \uc0ac\uc6a9\ud560 \uac70\uc608\uc694. npm\ub85c \uc124\uce58\ud558\uc138\uc694:<br \/>\n<script src=\"https:\/\/gist.github.com\/10cafcafca5f52775b531a3000ecccb2.js?file=install.sh\"><\/script><noscript><pre><code class=\"language-shell shell\">sudo npm install manta -g<\/code><\/pre><\/noscript><br \/>\n\uadf8\ub9ac\uace0 \uc6b0\ub9ac\ub294 \ub9cc\ud0c0 \ud658\uacbd\uc744 \uc900\ube44\ud574\uc57c \ub3fc\uc694. <a href=\"https:\/\/my.joyent.com\/main\/#!\/manta\/intro\">\ub9cc\ud0c0 \uc6f9 \uc0ac\uc774\ud2b8<\/a>\uc5d0\uc11c \ubcf5\uc0ac\ud558\uc138\uc694:<br \/>\n<script src=\"https:\/\/gist.github.com\/10cafcafca5f52775b531a3000ecccb2.js?file=environment.sh\"><\/script><noscript><pre><code class=\"language-shell shell\"># https:\/\/my.joyent.com\/main\/#!\/manta\/intro Lists your&#039;s\nexport MANTA_URL=https:\/\/us-east.manta.joyent.com;\nexport MANTA_USER=&lt;Joyent-User&gt;;\nexport MANTA_KEY_ID=&lt;ssh-public-key-finger-print&gt;;\n# Or read it directly from your local .ssh keys\nexport MANTA_KEY_ID=$(ssh-keygen -l -f $HOME\/.ssh\/id_rsa.pub | awk &#039;{print $2}&#039;)\n<\/code><\/pre><\/noscript><br \/>\n\uc9c0\uae08 \ub2e4 \uc900\ube44\ub410\uc5b4\uc694!<\/p>\n<h2>\ud30c\uc77c\ub4e4\uc744 \uc800\uc7a5\ud558\uc790<\/h2>\n<p>\uc6b0\ub9ac\ub294 \uba3c\uc800 \ud30c\uc77c\uc744 \uba86\uac8c \uc5c5\ub85c\ub4dc\ud558\uc138\uc694.<br \/>\n<script src=\"https:\/\/gist.github.com\/10cafcafca5f52775b531a3000ecccb2.js?file=put-and-get.sh\"><\/script><noscript><pre><code class=\"language-shell shell\">echo &quot;Hi there, internet&quot; &gt; ~\/hello-manta.txt\n# Putting up a simple file\nmput -f ~\/hello-manta.txt ~~\/stor\/hello-manta.txt\n\n# Can get it again\nmget ~~\/stor\/hello-manta.txt\n\n# Can put any content, here piped beer data from stack exchange\ncurl -sL https:\/\/tools.ietf.org\/rfc\/rfc2616.txt | mput -p ~~\/stor\/blog\/rfc2616.txt\n\n# List directory\nmls ~~\/stor\/blog\/\n# List more\nmls -l ~~\/stor\/blog\/\n\n# Find stuff\nmfind -n rfc*.txt ~~\/stor\/blog\/\n\n# Delete everything\nmrm -r ~~\/stor\/blog\/<\/code><\/pre><\/noscript><br \/>\n`mput`\ub85c \uc5c5\ub85c\ub4dc\ud574\uc694.  `-f`\ub294 \uc774 \ud30c\uc77c \uc5c5\ub85c\ub4dc\ud574\uc694. `~~\/stor\/hello-manta.txt`\ub294 \ub9cc\ud0c0\uc758 \ud30c\uc77c \uc5b4\ub514\uc5d0 \uc800\uc7a5\ud574\uc694. `~~&#8217;\ub294 unix \uac19\uc740 \uc0ac\uc6a9\uc790\uc758 \ud3f4\ub354\uac00 \ub73b\uc774\uc5d0\uc694. \uadf8\ub9ac\uace0 `mget`\ub85c \ud30c\uc77c \ub2e4\uc2dc \ub2e4\uc6b4\ub85c\ub4dc\ud560 \uc218 \uc788\uc5b4\uc694. `mput`\ub294 \uc720\ub2c9\uc2a4 \ud30c\uc774\ud504\ub85c \ub2e4 \uc5c5\ub85c\ub4dc\ud560 \uc218 \uc788\uc5b4\uc694. \uc5ec\uae30\uc5d0 \uc6b0\ub9ac\ub294 RFC-\ubb38\uc11c \uc5c5\ub85c\ub4dc\ud574\uc694. `-p`\ub294 \ud3f4\ub354\uac00 \uc544\uc9c1 \uc5c6\uc73c\uba74 \uc0c8\ub85c\uc6b4 \ud3f4\ub354 \ub9cc\ub4e4 \uac70\uc608\uc694. `mls` \ud50c\ub354\ub97c \uba85\ubd80\ud558\uace0 `mfind`\ub85c \ud30c\uc77c\uc744 \uc774\ub984\uc73c\ub85c \ucc3e\uc744 \uc218 \uc788\uc5b4\uc694. \uadf8\ub9ac\uace0 `mrm` \ud30c\uc77c\uc744 \uc0ad\uc81c\ud574\uc694.<\/p>\n<h2>\ub9cc\ud0c0\uc758 \ube44\ubc00\uc740: \uacc4\uc0b0<\/h2>\n<p>\uc6b0\ub9ac\ub294 \uba3c\uc800 \uc601\ud654 \uba87\uac8c \uc5c5\ub85c\ub4dc\ud560\uac8c\uc694.<br \/>\n<script src=\"https:\/\/gist.github.com\/10cafcafca5f52775b531a3000ecccb2.js?file=upload-more.sh\"><\/script><noscript><pre><code class=\"language-shell shell\">curl -sL http:\/\/www.caminandes.com\/download\/01_llama_drama_1080p.zip | mput -p ~~\/stor\/blog\/caminandes_01.zip\ncurl -sL http:\/\/www.caminandes.com\/download\/02_gran_dillama_1080p.zip | mput -p ~~\/stor\/blog\/caminandes_02.zip\ncurl -sL http:\/\/www.caminandes.com\/download\/03_caminandes_llamigos_1080p.mp4 | mput -p ~~\/stor\/blog\/caminandes_03.mp4\n<\/code><\/pre><\/noscript><br \/>\n\uadf8\ub7fc \uc774 \ud30c\uc77c\uc77c \ub9cc\ud0c0\uc5d0\uc11c \uc800\uc7a5\ud588\uc5b4\uc694. \uc544\ub9c8 \ud578\ub4dc\ud3f0 \uc704\ud574 \uc791\uc740 \ube44\ub514\uc624 \ud30c\uc77c \uc88b\uaca0\ub2e4. \uadf8\ub798\uc11c \uc6b0\ub9ac\ub294 \ube44\ub514\uc624 \ub2e4\uc6b4 \ubc1b\uace0 \ud2b8\ub79c\uc2a4 \ucf54\ub4dc \ud558\uace0 \uc5c5\ub85c\ub4dc\ud560\uae4c\uc694?<br \/>\n\uc774 \ud30c\uc77c \uba87GB \ud06c\uba74 \ub2e4\uc6b4 \ubc1b\uace0 \ub2e4\uc2dc \uc5c5\ub85c\ub4dc\ud560\uae4c\uc694? \uc544\ub2c8\uc694! \ub9cc\ud0c0\ub294 \uacc4\uc0b0\ud560 \uc218 \uc788\uc5b4\uc11c \uc6b0\ub9ac\ub294 \ub9cc\ud0c0\uc5d0 \ud2b8\ub79c\uc2a4 \ucf54\ub4dc\ud560 \uc218 \uc788\uc5b4\uc694.<br \/>\n\uc544, \uadf8\ub798\uc11c \uc6b0\ub9ac\ub294 \uc0c8\ub85c\uc6b4 \ud504\ub808\uc784\uc6cc\ud06c(framework) \ubc30\uc6cc\uc57c \ub3fc\uc694? \uc544\ub2c8\uc694! \ub9cc\ud0c0\ub294 \uadf8\ub0e5 \ubcf4\ud1b5 \uc720\ub2c9\uc2a4 \ud504\ub85c\uadf8\ub7a8 \uc0ac\uc6a9\ud574\uc694! \uc2dc\uc791\ud558\uc790!<\/p>\n<p><script src=\"https:\/\/gist.github.com\/10cafcafca5f52775b531a3000ecccb2.js?file=mlogin.sh\"><\/script><noscript><pre><code class=\"language-shell shell\"># Login to you&#039;re stored file. \n# After that, you get a regular prompt\nmlogin ~~\/stor\/blog\/caminandes_03.mp4\n\n# Check out the enviroment\nenv\n# The MANTA_INPUT_FILE will contain the actual file\n# The MANTA_INPUT_OBJECT the name in the store\nMANTA_OUTPUT_BASE=\/Gamlor\/jobs\/f018b6a5-aa28-44fb-bc30-b5cca7a1db60\/stor\/Gamlor\/stor\/blog\/caminandes_03.mp4.0.\nMANTA_INPUT_FILE=\/manta\/Gamlor\/stor\/blog\/caminandes_03.mp4\nMANTA_INPUT_OBJECT=\/Gamlor\/stor\/blog\/caminandes_03.mp4\n\n# Try out things you wish to do on the file. Like for a video, ffmpeg can transcode a video to smaller sizes.\n# Like this one to make it way smaller, for like a phone\nffmpeg -i $MANTA_INPUT_FILE -strict -2 -b:v 500k -s 320x240 -vcodec mpeg4 -acodec aac ~\/small.mp4\n\n# Once you explored, you can exit\nexit<\/code><\/pre><\/noscript><br \/>\n\uc6b0\ub9ac\ub294 `mlogin`\ub85c \uc774 \ud30c\uc77c\uc744 \uc5f0\ub77d\ud574\uc694. \uc9c4\uc9dc\uc694. \uc774\ub807\uac8c \ud30c\uc77c \uc606\uc5d0\uc11c \ubaa8\uc740 \uc720\ub2c9\uc2a4 \ud504\ub85c\uadf8\ub7a8 \uc0ac\uc6a9\ud558\uace0 \ubaa8\uc740 \uacc4\uc0b0\ud560 \uc218 \uc788\uc5b4\uc694. \uc6b0\ub9ac\ub294 \uc791\uc740 \ube44\ub514\uc624\ub97c \ub9cc\ub4e4\uace0 \uc2f6\uc5b4\uc11c &#8216;ffmpeg&#8217; \uc0ac\uc6a9\ud574\ubd10\uc694. \uadf8\ub370 \uc6b0\ub2c8\ub294 \ubaa8\ub4e0 \ube44\ub514\uc624\ub97c \ud2b8\ub80c\uc218 \ucf54\ub4dc \ud558\uace0 \uc2f6\uc5b4\uc694. \uadf8\ub798\uc694! `mjob`\ub85c \uc0ac\uc6a9 \uc2dc\uc791\ud574\uc694.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/10cafcafca5f52775b531a3000ecccb2.js?file=mjob-start.sh\"><\/script><noscript><pre><code class=\"language-shell shell\">#mjob: Takes a list of Manta path. Applies the program on it. -o waits for the task and returns the stdout\necho ~~\/stor\/blog\/caminandes_03.mp4 | mjob create -o -m &#039;sha1sum&#039;\n#=&gt; added 1 input to 61c30a0c-c7f0-e09c-c995-8fc5d61b06c3\n#=&gt; ddd2bf01f87be76b875efafd46c9930f722113b5  -\n\n#So, with mfind, we can now do calculations across files\nmfind  ~~\/stor\/blog\/ | mjob create -o -m &#039;sha1sum&#039;\n#=&gt; added 3 inputs to fb3aa947-b637-c5ea-8d38-b42620cbef1d\n#=&gt; 07acf89b74b677432acc3ee6579bcbb8ee13640e  -\n#=&gt; 0e502cad377f75973c597eab2318f39aa4763ad4  -\n#=&gt; ddd2bf01f87be76b875efafd46c9930f722113b5  -\n\n#Or more pretty listing.\n# First we hash the data: sha1sum\n# Then fetch extract the first colum. Note that we escape the dollar sign: awk &quot;{print \\$1}&quot;\n# Last, compose together the hash and the file name: echo $(cat) $(basename $MANTA_INPUT_OBJECT)\nmfind ~~\/stor\/blog\/ | mjob create -o -m &#039;sha1sum | awk &quot;{print \\$1}&quot;| echo $(cat) $(basename $MANTA_INPUT_OBJECT)&#039; \n#=&gt; added 3 inputs to 8bc9b130-9b73-47c5-dec9-ed4e87cdc761\n#=&gt; 07acf89b74b677432acc3ee6579bcbb8ee13640e caminandes_02.zip\n#=&gt; ddd2bf01f87be76b875efafd46c9930f722113b5 caminandes_03.mp4\n#=&gt; 0e502cad377f75973c597eab2318f39aa4763ad4 caminandes_01.zip\n\n\n\n# For our movie tranformation, we first unzip the zip files.\n# zip files are not streamable. So we ditch the stdin, an4d read from the file: unzip $MANTA_INPUT_FILE -d ~\/out &lt; \/dev\/null\n# Then, get the output file name: tail -n 1\n# Extract the actual file name column: awk &#039;{print $2}&#039; \n# Push that file to stdout: xargs cat\n# And use manta&#039;s mpipe to create a named Manta output file: mpipe ${MANTA_INPUT_OBJECT}.mp4\nmfind -t o -n &#039;.zip$&#039; ~~\/stor\/blog\/ | mjob create -w -m &quot;unzip \\$MANTA_INPUT_FILE -d ~\/out &lt; \/dev\/null \\\n| tail -n 1 | awk &#039;{print \\$2}&#039; | xargs cat | mpipe \\${MANTA_INPUT_OBJECT}.mp4&quot;\n\n# Last step. Transcode the videos to a mobile format:\n# The downloaded video might not be streamable. So we cannot take it from the stdin. So, just read if from the file.\n# First transcode it to a 600kbit\/s stream, 320x240 resolution, mp4 format: ffmpeg -nostdin -i \\$MANTA_INPUT_FILE -strict -2 -b:v 300k -s 320x240 -vcodec mpeg4 -acodec aac ~\/tmp.mp4\n# Cat the file, pipe it to a named Manta output file: cat ~\/tmp.mp4 | mpipe \\${MANTA_INPUT_OBJECT}.mobile.mp4\nmfind -t o -n &#039;.mp4$&#039; ~~\/stor\/blog\/ | mjob create -w -m &quot;ffmpeg -nostdin -i \\$MANTA_INPUT_FILE \\\n-strict -2 -b:v 600k -s 320x240 -vcodec mpeg4 -acodec aac ~\/tmp.mp4 &gt; \/dev\/null &amp;&amp; cat ~\/tmp.mp4 | mpipe \\${MANTA_INPUT_OBJECT}.mobile.mp4&quot;\n\n# After completion:\nmls ~~\/stor\/blog\n#=&gt; caminandes_01.zip\n#=&gt; caminandes_01.zip.mp4\n#=&gt; caminandes_01.zip.mp4.mobile.mp4\n#=&gt; caminandes_02.zip\n#=&gt; caminandes_02.zip.mp4\n#=&gt; caminandes_02.zip.mp4.mobile.mp4\n#=&gt; caminandes_03.mp4\n#=&gt; caminandes_03.mp4.mobile.mp4\n\n# fetch a mobile video to check it out:\nmget ~~\/stor\/blog\/caminandes_03.mp4.mobile.mp4 &gt; caminandes_03.mp4.mobile.mp4\n<\/code><\/pre><\/noscript><br \/>\n`mjob`\ub294 \ub9cc\ud130 \ud30c\uc77c \uacbd\ub85c\ub97c `stdin`\ub85c \ubc1b\uc544\uc694. `mjob create`\uac00 \uc0c8\ub85c\uc6b4 \uacc4\uc0b0 \uc2dc\uc791\ud574\uc694. `-o`\ub97c \uc0ac\uc6a9 \ud558\uba74 \uacc4\uc0b0 \ub05d\ub0a0 \ub54c \uacb0\uacfc\ub97c \uc0dd\uae38\uc744 \uac70\uc608\uc694. \uadf8\ub9ac\uace0 `-m`\ud6c4\uc5d0 \uacc4\uc0b0 \uc788\uc5b4\uc694.<br \/>\n1\ubc88 \uc608: `~~\/stor\/blog\/caminandes_03.mp4&#8242; \ud30c\uc77c\uc758 `sha1` \uacc4\uc0b0\ud574\uc694.<br \/>\n2\ubc88 \uc608: `mfind`\ub85c \ubaa8\ub4e0 \ud30c\uc77c \ucc3e\uace0 \ud30c\uc77c\uc758 `sha1` \uacc4\uc0b0\ud574\uc694.<br \/>\n3\ubc88 \uc608: \uc6b0\ub9ac\uac00 \uc720\ub2c9\uc2a4 \ud30c\uc774\ud504 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc5b4\uc694. \uadf8\ub798\uc11c \uc798 \uc77d\uc744 \uc218 \uc788\ub294 \uc904 \ub9cc\ub4e4\uc5b4\uc694.<\/p>\n<p>\uadf8\ub7fc \uc720\uc6a9\ud55c \uacc4\uc0b0 \ud574\ubd10\uc694. caminandes_01.zip\ud558\uace0 caminandes_02.zip \ud30c\uc77c `unzip`\ub85c \uc5f4\uace0 `mpipe`\ub85c \uc0c8\ub85c\uc6b4 \ub9cc\ud0c0 \ud30c\uc77c\uc744 \uc800\uc7a5\ud574\uc694. `-w`\uac00 \uacc4\uc0b0\uc758 \ub05d\uc744 \uae30\ub2e4\ub824\uc694.<br \/>\n\uadf8\ub9ac\uace0 \uc774\uc81c \uc791\uc740 \ud578\ub4dc\ud3f0\uc758 \ube44\ub514\uc624 \ub9cc\ub4e4 \uc218 \uc788\uc5b4\uc694. `ffmpeg`\ub85c \ud2b8\ub80c\uc218 \ucfe0\ub529 \ud558\uace0 mpipe\ub85c \ud30c\uc77c\uc744 \uc800\uc7a5\ud574\uc694. \ud0c0\ub2e4~~~~! \uc791\uc740 \ube44\ub514\uc624 \uc788\uc5b4\uc694. `mget`\ub85c \ub2e4\uc6b4 \ubc1b\uc73c\uc138\uc694.<br \/>\n\uc774\uac74 \ub2e4 \ub9cc\ud0c0\ub85c \ud588\uc5b4\uc694. \uc774 \ud30c\uc77c\ub4e4 \ud06c\uba74 \uc544\ubb34\uac83\ub3c4 \ub2e4\uc6b4 \ubc1b\uc9c0 \uc54a\uace0 \uc800\uae30\uc5d0, \ub9cc\ud0c0\uc5d0 \uacc4\uc0b0\ud588\uc5b4\uc694. \ub300\ubc15!<\/p>\n<h2>\ub9f5\ub9ac\ub4c0\uc2a4<\/h2>\n<p>\uc774\uc81c\uae4c\uc9c0 \uc6b0\ub9ac\ub294 `mjob -m`\ub9cc \uc0ac\uc6a9\ud588\uc5b4\uc694. `mjob`\uac00 \ub9f5\ub9ac\ub4c0\uc2a4 \ud560 \uc218 \uc788\uc5b4\uc694. \uac1c\uc694\ub97c \ub9cc\ub4e4\uace0 \uc2f6\uc73c\uba74 \ub9f5\ub9ac\ub4c0\uc2a4 \ud560 \uc218 \uc788\uc5b4\uc694. \uc608\ub97c \ubcf4\uc77c \uac70\uc608\uc694. \ubaa8\ub4e0 \ube44\ub514\uc624\uc758 \ube44\ud2b8 \uc804\uc1a1\uc18d\ub3c4 \ud1b5\uacc4 \ud574\uc694:<\/p>\n<script src=\"https:\/\/gist.github.com\/10cafcafca5f52775b531a3000ecccb2.js?file=reduce.sh\"><\/script><noscript><pre><code class=\"language-shell shell\"># Let&#039;s list the bit rate:\n# First find the bitrate: ffprobe  $MANTA_INPUT_FILE 2&gt;&amp;1\n# Find the bitrate line: grep bitrate\nmfind -n mp4$ ~~\/stor\/blog | mjob create -o -m &#039;ffprobe  $MANTA_INPUT_FILE 2&gt;&amp;1 | grep bitrate&#039;\n#=&gt; added 6 inputs to 00abc11b-2bad-405c-8add-941400614cc4\n#=&gt; Duration: 00:02:26.05, start: 0.000000, bitrate: 6900 kb\/s\n#=&gt; Duration: 00:02:30.13, start: 0.000000, bitrate: 10680 kb\/s\n#=&gt; Duration: 00:02:30.12, start: 0.021333, bitrate: 717 kb\/s\n#=&gt; Duration: 00:01:30.02, start: 0.023220, bitrate: 672 kb\/s\n#=&gt; Duration: 00:02:26.08, start: 0.021333, bitrate: 725 kb\/s\n#=&gt; Duration: 00:01:30.00, start: 0.000000, bitrate: 3120 kb\/s\n\n# Let&#039;s list the bit rate again:\n# Only extract the bit rate colum: awk &quot;{print \\$6}&quot;\nmfind -n mp4$ ~~\/stor\/blog | mjob create -o -m &#039;ffprobe  $MANTA_INPUT_FILE 2&gt;&amp;1 | grep bitrate | awk &quot;{print \\$6}&quot;&#039;\n#=&gt; added 6 inputs to 6c1b8b80-1516-e8e5-f6b6-99c5ebcd9f3b\n#=&gt; 6900\n#=&gt; 672\n#=&gt; 10680\n#=&gt; 717\n#=&gt; 725\n#=&gt; 3120\n\n# With the reduce phase we can collect the result&#039;s back together.\n# For example, get the min, max and mean bit reate of all our videos\nmfind -n mp4$ ~~\/stor\/blog | mjob create -o -m &#039;ffprobe  $MANTA_INPUT_FILE 2&gt;&amp;1 | grep bitrate | awk &quot;{print \\$6}&quot;&#039; \\\n-r &#039;maggr max,min,mean&#039;<\/code><\/pre><\/noscript>\n<p>\uba3c\uc800 `mjob`\ub85c \ube44\ub514\uc624 \uc804\uc1a1\uc18d\ub3c4 \ubc1b\uc544\uc694. `ffprobe`\uac00 \ube44\ub514\uc624\uc758 \uc815\ubcf4\uc758 \ubc1b\uace0 `grep`\ub85c bitrate\ub97c \ucc3e\uace0 `awk`\ub85c bitrate\uc758 6\uc5f4 \ubc1b\uc544\uc694. \ub9c8\uc9c0\ub9c9, `-r&#8217;\ud6c4\uc5d0 \ub9ac\ub4c0\uc2a4 \uc788\uc5b4\uc694. \uc5ec\uae30\uc5d0 `<a href=\"https:\/\/apidocs.joyent.com\/manta\/maggr.html\">maggr<\/a>&#8216;\ub85c \ud1b5\uacc4 \ud574\uc694. (\u3145_\u3145)<\/p>\n<h2>\ub9cc\ud0c0 \ud0d0\uc0c9\ud574\uc8fc\uc138\uc694<\/h2>\n<p>\uc800\ub294 \ub9ce\uc740 \uc8fc\uc81c \ube7c\uc5c8\uc5b4\uc694. <a href=\"https:\/\/apidocs.joyent.com\/manta\/index.html\">\ub9cc\ud0c0\uc758 \uc548\ub0b4<\/a> \ubcf4\uace0 \ud0d0\uc0c9\ud574\uc8fc\uc138\uc694. =)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(English version will come out, probably tomorrow =) ) \uc774\uc81c\uae4c\uc9c0 \uc6b0\ub9ac\ub294 Joyent\uc758 Triton \uc0ac\uc6a9\ud588\uc5b4\uc694. \ud2b8\ub9ac\ud230\uc73c\ub85c Docker \ucee8\ud14c\uc774\ub108\ub97c \ubc30\ud3ec\ud588\uc5b4\uc694. \uc544\ub9c8 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uace0 \uc2f6\uc5b4\uc694. \ub9cc\ud0c0\ub294 \uc544\ub9c8\uc874 S3 \uac19\uc740 \uc2a4\ud1a0\ub9ac\uc9c0 \uc11c\ube44\uc2a4\uc608\uc694. \uadfc\ub370 \ub9cc\ub2e4\ub294&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[187,255],"tags":[300,301,306],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/3361"}],"collection":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/comments?post=3361"}],"version-history":[{"count":22,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/3361\/revisions"}],"predecessor-version":[{"id":3441,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/3361\/revisions\/3441"}],"wp:attachment":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/media?parent=3361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/categories?post=3361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/tags?post=3361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}